usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [86/90] Revert global substation of “test” with “org.apache.usergrid.test” that was breaking everything, migrate REST tests to FasterXML Jackson, put JSPs in the right place.
Date Wed, 05 Feb 2014 21:29:20 GMT
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/applications/users/UserResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/users/UserResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/users/UserResourceIT.java
index dfea6e3..89b8337 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/users/UserResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/users/UserResourceIT.java
@@ -32,6 +32,7 @@ import org.apache.usergrid.rest.AbstractRestIT;
 import org.apache.usergrid.rest.applications.utils.UserRepo;
 import org.apache.usergrid.utils.UUIDUtils;
 import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -64,6 +65,8 @@ public class UserResourceIT extends AbstractRestIT {
 
     private static Logger log = LoggerFactory.getLogger( UserResourceIT.class );
 
+    private static ObjectMapper mapper = new ObjectMapper();
+
 
     @Test
     public void usernameQuery() {
@@ -72,9 +75,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         String ql = "username = 'user*'";
 
-        JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "ql", ql )
+        JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).queryParam( "ql", ql )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( UserRepo.INSTANCE.getByUserName( "user1" ), getIdFromSearchResults( node, 0 ) );
         assertEquals( UserRepo.INSTANCE.getByUserName( "user2" ), getIdFromSearchResults( node, 1 ) );
@@ -89,9 +92,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         String ql = "name = 'John*'";
 
-        JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "ql", ql )
+        JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).queryParam( "ql", ql )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( UserRepo.INSTANCE.getByUserName( "user2" ), getIdFromSearchResults( node, 0 ) );
         assertEquals( UserRepo.INSTANCE.getByUserName( "user3" ), getIdFromSearchResults( node, 1 ) );
@@ -104,12 +107,12 @@ public class UserResourceIT extends AbstractRestIT {
 
         String ql = "select uuid name = 'John*'";
 
-        ApplicationInfo appInfo = setup.getMgmtSvc().getApplicationInfo( "org.apache.usergrid.test-organization/org.apache.usergrid.test-app" );
-        OrganizationInfo orgInfo = setup.getMgmtSvc().getOrganizationByName( "org.apache.usergrid.test-organization" );
+        ApplicationInfo appInfo = setup.getMgmtSvc().getApplicationInfo( "test-organization/test-app" );
+        OrganizationInfo orgInfo = setup.getMgmtSvc().getOrganizationByName( "test-organization" );
 
         resource().path( "/" + orgInfo.getUuid() + "/" + appInfo.getId() + "/users" ).queryParam( "ql", ql )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
     }
 
 
@@ -120,9 +123,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         String ql = "name contains 'Smith' order by name ";
 
-        JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "ql", ql )
+        JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).queryParam( "ql", ql )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( UserRepo.INSTANCE.getByUserName( "user1" ), getIdFromSearchResults( node, 0 ) );
         assertEquals( UserRepo.INSTANCE.getByUserName( "user2" ), getIdFromSearchResults( node, 1 ) );
@@ -138,9 +141,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         String ql = "username contains 'user' ";
 
-        resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "ql", ql )
+        resource().path( "/test-organization/test-app/users" ).queryParam( "ql", ql )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
     }
 
 
@@ -152,9 +155,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         String ql = "picture = 'foo' ";
 
-        resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "ql", ql )
+        resource().path( "/test-organization/test-app/users" ).queryParam( "ql", ql )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
     }
 
 
@@ -331,18 +334,18 @@ public class UserResourceIT extends AbstractRestIT {
         Entity userEntity = response.getEntities().get( 0 );
 
         // get the user with username property that has an email value
-        JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + username )
+        JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + username )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( username, node.get( "entities" ).get( 0 ).get( "username" ).asText() );
         assertEquals( name, node.get( "entities" ).get( 0 ).get( "name" ).asText() );
         assertEquals( email, node.get( "entities" ).get( 0 ).get( "email" ).asText() );
 
         // get the user with email property value
-        node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + email )
+        node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + email )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( username, node.get( "entities" ).get( 0 ).get( "username" ).asText() );
         assertEquals( name, node.get( "entities" ).get( 0 ).get( "name" ).asText() );
@@ -434,9 +437,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         UUID createdId = response.getEntities().get( 0 ).getUuid();
 
-        JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + createdId )
+        JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + createdId )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).delete( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).delete( HashMap.class ));
 
         assertNull( node.get( "errors" ) );
 
@@ -482,47 +485,47 @@ public class UserResourceIT extends AbstractRestIT {
         // second using pluralized form
 
         // plural collection name
-        String path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/conn1/%s", firstCreatedId, secondCreatedId );
+        String path = String.format( "/test-organization/test-app/users/%s/conn1/%s", firstCreatedId, secondCreatedId );
 
         JsonNode node =
-                resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                        .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+                mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                        .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
         // singular collection name
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/user/%s/conn2/%s", firstCreatedId, secondCreatedId );
+        path = String.format( "/test-organization/test-app/user/%s/conn2/%s", firstCreatedId, secondCreatedId );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/conn1", firstCreatedId );
+        path = String.format( "/test-organization/test-app/users/%s/conn1", firstCreatedId );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/user/%s/conn1", firstCreatedId );
+        path = String.format( "/test-organization/test-app/user/%s/conn1", firstCreatedId );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/conn2", firstCreatedId );
+        path = String.format( "/test-organization/test-app/users/%s/conn2", firstCreatedId );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/user/%s/conn2", firstCreatedId );
+        path = String.format( "/test-organization/test-app/user/%s/conn2", firstCreatedId );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
     }
@@ -556,25 +559,25 @@ public class UserResourceIT extends AbstractRestIT {
         // second using pluralized form
 
         // named entity in collection name
-        String path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/conn1/users/%s", firstCreatedId, username2 );
+        String path = String.format( "/test-organization/test-app/users/%s/conn1/users/%s", firstCreatedId, username2 );
 
         JsonNode node =
-                resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                        .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+                mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                        .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
         // named entity in collection name
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/conn2/users/%s", username1, username2 );
+        path = String.format( "/test-organization/test-app/users/%s/conn2/users/%s", username1, username2 );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
     }
 
 
-    /** Usergrid-1222 org.apache.usergrid.test */
+    /** Usergrid-1222 test */
     @Test
     public void connectionQuerybyEmail() {
         UUID id = UUIDUtils.newTimeUUID();
@@ -602,11 +605,11 @@ public class UserResourceIT extends AbstractRestIT {
         Map<String, String> perms = new HashMap<String, String>();
         perms.put( "permission", "get:/stuff/**" );
 
-        String path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s/permissions", roleId1 );
+        String path = String.format( "/test-organization/test-app/roles/%s/permissions", roleId1 );
 
         JsonNode node =
-                resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                        .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, perms );
+                mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                        .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, perms ));
 
 
         //Create the second role
@@ -624,17 +627,17 @@ public class UserResourceIT extends AbstractRestIT {
         perms = new HashMap<String, String>();
         perms.put( "permission", "get:/stuff/**" );
 
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s/permissions", roleId2 );
+        path = String.format( "/test-organization/test-app/roles/%s/permissions", roleId2 );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, perms );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, perms ));
 
 
         //connect the entities where role is the root
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s/users/%s", roleId1, userId );
+        path = String.format( "/test-organization/test-app/roles/%s/users/%s", roleId1, userId );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         // now create a connection of "likes" between the first user and the
         // second using pluralized form
@@ -643,58 +646,58 @@ public class UserResourceIT extends AbstractRestIT {
 
 
         //connect the second role
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s/users/%s", roleId2, userId );
+        path = String.format( "/test-organization/test-app/roles/%s/users/%s", roleId2, userId );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
 
         assertEquals( userId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
         //query the second role, it should work
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s/users", roleId2 );
+        path = String.format( "/test-organization/test-app/roles/%s/users", roleId2 );
 
-        node = resource().path( path ).queryParam( "access_token", access_token )
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token )
                 .queryParam( "ql", "select%20*%20where%20username%20=%20'" + email + "'" )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( userId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
 
         //query the first role, it should work
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s/users", roleId1 );
+        path = String.format( "/test-organization/test-app/roles/%s/users", roleId1 );
 
-        node = resource().path( path ).queryParam( "access_token", access_token )
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token )
                 .queryParam( "ql", "select%20*%20where%20username%20=%20'" + email + "'" )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( userId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
 
         //now delete the first role
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s", roleId1 );
+        path = String.format( "/test-organization/test-app/roles/%s", roleId1 );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).delete( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).delete( HashMap.class ));
 
         //query the first role, it should 404
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s/users", roleId1 );
+        path = String.format( "/test-organization/test-app/roles/%s/users", roleId1 );
 
         try {
-            node = resource().path( path ).queryParam( "access_token", access_token )
+            node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token )
                     .queryParam( "ql", "select%20*%20where%20username%20=%20'" + email + "'" )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         }
         catch ( UniformInterfaceException e ) {
             assertEquals( Status.NOT_FOUND, e.getResponse().getClientResponseStatus() );
         }
 
         //query the second role, it should work
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles/%s/users", roleId2 );
+        path = String.format( "/test-organization/test-app/roles/%s/users", roleId2 );
 
-        node = resource().path( path ).queryParam( "access_token", access_token )
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token )
                 .queryParam( "ql", "select%20*%20where%20username%20=%20'" + email + "'" )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( userId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
     }
@@ -730,20 +733,20 @@ public class UserResourceIT extends AbstractRestIT {
         // second using pluralized form
 
         // named entity in collection name
-        String path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/conn1/pizzas/%s", firstCreatedId,
+        String path = String.format( "/test-organization/test-app/users/%s/conn1/pizzas/%s", firstCreatedId,
                 secondCreatedId );
 
         JsonNode node =
-                resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                        .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+                mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                        .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
 
         // named entity in collection name
-        path = String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/conn2/pizzas/%s", username1, name );
+        path = String.format( "/test-organization/test-app/users/%s/conn2/pizzas/%s", username1, name );
 
-        node = resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+        node = mapper.valueToTree(resource().path( path ).queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         assertEquals( secondCreatedId.toString(), getEntity( node, 0 ).get( "uuid" ).asText() );
     }
@@ -764,9 +767,9 @@ public class UserResourceIT extends AbstractRestIT {
         Entity userEntity = response.getEntities().get( 0 );
 
         // attempt to log in
-        JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/token" ).queryParam( "username", username )
+        JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app/token" ).queryParam( "username", username )
                 .queryParam( "password", "password" ).queryParam( "grant_type", "password" )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( username, node.get( "user" ).get( "username" ).asText() );
         assertEquals( name, node.get( "user" ).get( "name" ).asText() );
@@ -781,14 +784,14 @@ public class UserResourceIT extends AbstractRestIT {
         userEntity.setProperty( "password", "newp2ssword" );
         userEntity.setProperty( "pin", "newp1n" );
 
-        node = resource().path( String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s", username ) )
+        node = mapper.valueToTree(resource().path( String.format( "/test-organization/test-app/users/%s", username ) )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).put( JsonNode.class, userEntity.getProperties() );
+                .type( MediaType.APPLICATION_JSON_TYPE ).put( HashMap.class, userEntity.getProperties() ));
 
         // now see if we've updated
-        node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/token" ).queryParam( "username", username )
+        node = mapper.valueToTree(resource().path( "/test-organization/test-app/token" ).queryParam( "username", username )
                 .queryParam( "password", "password" ).queryParam( "grant_type", "password" )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertEquals( username, node.get( "user" ).get( "username" ).asText() );
         assertEquals( newName, node.get( "user" ).get( "name" ).asText() );
@@ -812,13 +815,13 @@ public class UserResourceIT extends AbstractRestIT {
 
         log.info( "UserResourceIT.test_POST_batch" );
 
-        JsonNode node = null;
+        JsonNode node;
 
         List<Map<String, Object>> batch = new ArrayList<Map<String, Object>>();
 
         Map<String, Object> properties = new LinkedHashMap<String, Object>();
         properties.put( "username", "test_user_1" );
-        properties.put( "email", "user1@org.apache.usergrid.test.com" );
+        properties.put( "email", "user1@test.com" );
         batch.add( properties );
 
         properties = new LinkedHashMap<String, Object>();
@@ -829,9 +832,9 @@ public class UserResourceIT extends AbstractRestIT {
         properties.put( "username", "test_user_3" );
         batch.add( properties );
 
-        node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" ).queryParam( "access_token", access_token )
+        node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" ).queryParam( "access_token", access_token )
                 .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                .post( JsonNode.class, batch );
+                .post( HashMap.class, batch ));
 
         assertNotNull( node );
         logNode( node );
@@ -843,28 +846,28 @@ public class UserResourceIT extends AbstractRestIT {
 
         UUID newUserUuid = UUIDUtils.newTimeUUID();
 
-        String userName = String.format( "org.apache.usergrid.test%s", newUserUuid );
+        String userName = String.format( "test%s", newUserUuid );
 
         Map<String, String> payload =
                 hashMap( "email", String.format( "%s@anuff.com", newUserUuid ) ).map( "username", userName )
                         .map( "name", "Ed Anuff" ).map( "password", "sesame" ).map( "pin", "1234" );
 
-        resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "access_token", access_token )
+        resource().path( "/test-organization/test-app/users" ).queryParam( "access_token", access_token )
                 .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                .post( JsonNode.class, payload );
+                .post( HashMap.class, payload );
 
         JsonNode response =
-                resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "access_token", access_token )
+                mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).queryParam( "access_token", access_token )
                         .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                        .get( JsonNode.class );
+                        .get( HashMap.class ));
 
         // disable the user
 
         Map<String, String> data = new HashMap<String, String>();
 
-        response = resource().path( String.format( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/%s/deactivate", userName ) )
+        response = mapper.valueToTree(resource().path( String.format( "/test-organization/test-app/users/%s/deactivate", userName ) )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, data );
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, data ));
 
         JsonNode entity = getEntity( response, 0 );
 
@@ -893,14 +896,14 @@ public class UserResourceIT extends AbstractRestIT {
 
         // TODO figure out what is being overridden? why 400?
         JsonNode node =
-                resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "access_token", access_token )
+                mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).queryParam( "access_token", access_token )
                         .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                        .get( JsonNode.class );
+                        .get( HashMap.class ));
 
         String uuid = node.get( "entities" ).get( 0 ).get( "uuid" ).asText();
 
-        node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + uuid ).queryParam( "access_token", access_token )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + uuid ).queryParam( "access_token", access_token )
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         logNode( node );
         assertEquals( "ed@anuff.com", node.get( "entities" ).get( 0 ).get( "email" ).asText() );
     }
@@ -934,9 +937,9 @@ public class UserResourceIT extends AbstractRestIT {
         data.put( "newpassword", newPassword );
 
         // change the password as admin. The old password isn't required
-        JsonNode node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff/password" )
+        JsonNode node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff/password" )
                 .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, data );
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, data ));
 
         assertNull( getError( node ) );
 
@@ -961,8 +964,8 @@ public class UserResourceIT extends AbstractRestIT {
 
         Status responseStatus = null;
         try {
-            resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff/password" ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, data );
+            resource().path( "/test-organization/test-app/users/edanuff/password" ).accept( MediaType.APPLICATION_JSON )
+                    .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, data );
         }
         catch ( UniformInterfaceException uie ) {
             responseStatus = uie.getResponse().getClientResponseStatus();
@@ -994,9 +997,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         String json = "{\"title\":\"" + roleName + "\",\"name\":\"" + roleName + "\"}";
         JsonNode node =
-                resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/roles" ).queryParam( "access_token", access_token )
+                mapper.valueToTree(resource().path( "/test-organization/test-app/roles" ).queryParam( "access_token", access_token )
                         .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                        .post( JsonNode.class, json );
+                        .post( HashMap.class, json ));
 
         // check it
         assertNull( node.get( "errors" ) );
@@ -1004,33 +1007,33 @@ public class UserResourceIT extends AbstractRestIT {
 
         // add Role
 
-        node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + createdId + "/roles/" + roleName )
+        node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + createdId + "/roles/" + roleName )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         // check it
         assertNull( node.get( "errors" ) );
         assertEquals( node.get( "entities" ).get( 0 ).get( "name" ).asText(), roleName );
 
-        node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + createdId + "/roles" )
+        node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + createdId + "/roles" )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         assertNull( node.get( "errors" ) );
         assertEquals( node.get( "entities" ).get( 0 ).get( "name" ).asText(), roleName );
 
 
         // remove Role
 
-        node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + createdId + "/roles/" + roleName )
+        node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + createdId + "/roles/" + roleName )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).delete( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).delete( HashMap.class ));
 
         // check it
         assertNull( node.get( "errors" ) );
 
-        node = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + createdId + "/roles" )
+        node = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + createdId + "/roles" )
                 .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         assertNull( node.get( "errors" ) );
         assertTrue( node.get( "entities" ).size() == 0 );
     }
@@ -1043,21 +1046,21 @@ public class UserResourceIT extends AbstractRestIT {
         String token2 = super.userToken( "edanuff", "sesame" );
 
         JsonNode response =
-                resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" ).queryParam( "access_token", token1 )
+                mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" ).queryParam( "access_token", token1 )
                         .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                        .get( JsonNode.class );
+                        .get( HashMap.class ));
 
         assertNotNull( getEntity( response, 0 ) );
 
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" ).queryParam( "access_token", token2 )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" ).queryParam( "access_token", token2 )
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertNotNull( getEntity( response, 0 ) );
 
         // now revoke the tokens
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff/revoketokens" )
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff/revoketokens" )
                 .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         // the tokens shouldn't work
 
@@ -1065,9 +1068,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         try {
             response =
-                    resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" ).queryParam( "access_token", token1 )
+                    mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" ).queryParam( "access_token", token1 )
                             .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                            .get( JsonNode.class );
+                            .get( HashMap.class ));
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -1079,9 +1082,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         try {
             response =
-                    resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" ).queryParam( "access_token", token2 )
+                    mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" ).queryParam( "access_token", token2 )
                             .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                            .get( JsonNode.class );
+                            .get( HashMap.class ));
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -1092,30 +1095,29 @@ public class UserResourceIT extends AbstractRestIT {
         String token3 = super.userToken( "edanuff", "sesame" );
         String token4 = super.userToken( "edanuff", "sesame" );
 
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" ).queryParam( "access_token", token3 )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" ).queryParam( "access_token", token3 )
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertNotNull( getEntity( response, 0 ) );
 
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" ).queryParam( "access_token", token4 )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" ).queryParam( "access_token", token4 )
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertNotNull( getEntity( response, 0 ) );
 
         // now revoke the token3
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff/revoketoken" )
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff/revoketoken" )
                 .queryParam( "access_token", token3 ).queryParam( "token", token3 ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         // the token3 shouldn't work
 
         status = null;
 
         try {
-            response =
-                    resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" ).queryParam( "access_token", token3 )
+            response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" ).queryParam( "access_token", token3 )
                             .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                            .get( JsonNode.class );
+                            .get( HashMap.class ));
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -1127,9 +1129,9 @@ public class UserResourceIT extends AbstractRestIT {
 
         try {
             response =
-                    resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/edanuff" ).queryParam( "access_token", token4 )
+                    mapper.valueToTree(resource().path( "/test-organization/test-app/users/edanuff" ).queryParam( "access_token", token4 )
                             .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                            .get( JsonNode.class );
+                            .get( HashMap.class ));
 
             status = Status.OK;
         }
@@ -1144,19 +1146,19 @@ public class UserResourceIT extends AbstractRestIT {
     @Test
     public void getToken() throws Exception {
 
-        createUser( "test_1", "test_1@org.apache.usergrid.test.com", "test123", "Test1 User" ); // client.setApiUrl(apiUrl);
-        createUser( "test_2", "test_2@org.apache.usergrid.test.com", "test123", "Test2 User" ); // client.setApiUrl(apiUrl);
-        createUser( "test_3", "test_3@org.apache.usergrid.test.com", "test123", "Test3 User" ); // client.setApiUrl(apiUrl);
+        createUser( "test_1", "test_1@test.com", "test123", "Test1 User" ); // client.setApiUrl(apiUrl);
+        createUser( "test_2", "test_2@test.com", "test123", "Test2 User" ); // client.setApiUrl(apiUrl);
+        createUser( "test_3", "test_3@test.com", "test123", "Test3 User" ); // client.setApiUrl(apiUrl);
 
-        ApplicationInfo appInfo = setup.getMgmtSvc().getApplicationInfo( "org.apache.usergrid.test-organization/org.apache.usergrid.test-app" );
+        ApplicationInfo appInfo = setup.getMgmtSvc().getApplicationInfo( "test-organization/test-app" );
 
         String clientId = setup.getMgmtSvc().getClientIdForApplication( appInfo.getId() );
         String clientSecret = setup.getMgmtSvc().getClientSecretForApplication( appInfo.getId() );
 
         JsonNode node =
-                resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/test_1/token" ).queryParam( "client_id", clientId )
+                mapper.valueToTree(resource().path( "/test-organization/test-app/users/test_1/token" ).queryParam( "client_id", clientId )
                         .queryParam( "client_secret", clientSecret ).accept( MediaType.APPLICATION_JSON )
-                        .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                        .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         String user_token_from_client_credentials = node.get( "access_token" ).asText();
 
@@ -1171,8 +1173,8 @@ public class UserResourceIT extends AbstractRestIT {
 
         // bad access token
         try {
-            resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/test_1/token" ).queryParam( "access_token", "blah" )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+            resource().path( "/test-organization/test-app/users/test_1/token" ).queryParam( "access_token", "blah" )
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -1182,9 +1184,9 @@ public class UserResourceIT extends AbstractRestIT {
         assertEquals( Status.UNAUTHORIZED, status );
 
         try {
-            resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/test_2/token" )
+            resource().path( "/test-organization/test-app/users/test_2/token" )
                     .queryParam( "access_token", user_token_from_client_credentials )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -1195,28 +1197,28 @@ public class UserResourceIT extends AbstractRestIT {
 
 
         JsonNode response = null;
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/test_1" )
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/test_1" )
                 .queryParam( "access_token", user_token_from_client_credentials ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertNotNull( getEntity( response, 0 ) );
 
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/test_1" )
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/test_1" )
                 .queryParam( "access_token", user_token_from_java ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertNotNull( getEntity( response, 0 ) );
 
         setup.getMgmtSvc().deactivateUser( appInfo.getId(), userId );
         try {
-            resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/token" ).queryParam( "grant_type", "password" )
+            resource().path( "/test-organization/test-app/token" ).queryParam( "grant_type", "password" )
                     .queryParam( "username", "test_1" ).queryParam( "password", "test123" )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
             fail( "request for deactivated user should fail" );
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
-            JsonNode body = uie.getResponse().getEntity( JsonNode.class );
+            JsonNode body = mapper.valueToTree(uie.getResponse().getEntity( HashMap.class ));
             assertEquals( "user not activated", body.findPath( "error_description" ).asText() );
         }
     }
@@ -1228,9 +1230,9 @@ public class UserResourceIT extends AbstractRestIT {
         createUser( randomName, randomName + "@apigee.com", "password", randomName );
 
         // should update a field
-        JsonNode response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + randomName )
+        JsonNode response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + randomName )
                 .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         logNode( response );
         assertNotNull( getEntity( response, 0 ) );
         // PUT on user
@@ -1241,14 +1243,14 @@ public class UserResourceIT extends AbstractRestIT {
                 hashMap( "email", randomName + "@apigee.com" ).map( "username", randomName ).map( "name", randomName )
                         .map( "password", "password" ).map( "pin", "1234" );
 
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "access_token", adminAccessToken )
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users" ).queryParam( "access_token", adminAccessToken )
                 .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                .put( JsonNode.class, payload );
+                .put( HashMap.class, payload ));
 
         logNode( response );
-        response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" + randomName )
+        response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" + randomName )
                 .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
         assertNotNull( getEntity( response, 0 ) );
         logNode( response );
@@ -1263,10 +1265,10 @@ public class UserResourceIT extends AbstractRestIT {
     public void queryForUuids() throws Exception {
 
         {
-            final JsonNode response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" )
+            final JsonNode response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" )
                     .queryParam( "ql", "select *" )               // query for entities
                     .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                    .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
             assertNotNull( "Entities must exist", response.get( "entities" ) );
             assertTrue( "Must be some entities", response.get( "entities" ).size() > 0 );
             assertEquals( "Must be users", "user", response.get( "entities" ).get( 0 ).get( "type" ).asText() );
@@ -1274,10 +1276,10 @@ public class UserResourceIT extends AbstractRestIT {
         }
 
         {
-            final JsonNode response = resource().path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users/" )
+            final JsonNode response = mapper.valueToTree(resource().path( "/test-organization/test-app/users/" )
                     .queryParam( "ql", "select uuid" )            // query for uuid properties
                     .queryParam( "access_token", access_token ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                    .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
             assertNotNull( "List must exist", response.get( "list" ) );
             assertTrue( "Must be some list items", response.get( "list" ).size() > 0 );
             assertNull( "Entities must not exist", response.get( "entries" ) );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java
index 2b271b8..850ae2f 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java
@@ -24,7 +24,7 @@ import org.junit.Ignore;
 
 
 /** @author tnine */
-@Ignore("Not a org.apache.usergrid.test")
+@Ignore("Not a test")
 public class TestUtils {
 
     /** Get the uuid at the given index for the root node.  If it doesn't exist, null is returned */

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
index fbc7426..9d4b61a 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/UserRepo.java
@@ -9,6 +9,7 @@ import javax.ws.rs.core.MediaType;
 
 import org.apache.usergrid.utils.UUIDUtils;
 import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
 
 import com.sun.jersey.api.client.WebResource;
 
@@ -18,6 +19,7 @@ import static org.apache.usergrid.utils.MapUtils.hashMap;
 public enum UserRepo {
     INSTANCE;
 
+    protected static ObjectMapper mapper = new ObjectMapper();
     private final Map<String, UUID> loaded = new HashMap<String, UUID>();
 
 
@@ -53,9 +55,9 @@ public enum UserRepo {
     private UUID createUser( Map<String, String> payload, WebResource resource, String access_token ) {
 
         JsonNode response =
-                resource.path( "/org.apache.usergrid.test-organization/org.apache.usergrid.test-app/users" ).queryParam( "access_token", access_token )
+                mapper.valueToTree(resource.path( "/test-organization/test-app/users" ).queryParam( "access_token", access_token )
                         .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                        .post( JsonNode.class, payload );
+                        .post( HashMap.class, payload ));
 
         String idString = response.get( "entities" ).get( 0 ).get( "uuid" ).asText();
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
index 89284e9..b0a2bea 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
@@ -54,7 +54,7 @@ import static org.junit.Assert.assertEquals;
 /** @author tnine */
 
 // @Ignore("Client login is causing tests to fail due to socket closure by grizzly.  Need to re-enable once we're not
-// using grizzly to org.apache.usergrid.test")
+// using grizzly to test")
 @Concurrent()
 public class ContentTypeResourceIT extends AbstractRestIT {
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/84a3c474/stack/rest/src/test/java/org/apache/usergrid/rest/management/ManagementResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ManagementResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ManagementResourceIT.java
index 408bd5d..a582282 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ManagementResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ManagementResourceIT.java
@@ -58,22 +58,22 @@ public class ManagementResourceIT extends AbstractRestIT {
 
         Map<String, String> data = new HashMap<String, String>();
         data.put( "newpassword", newPassword );
-        data.put( "oldpassword", "org.apache.usergrid.test" );
+        data.put( "oldpassword", "test" );
 
         // change the password as admin. The old password isn't required
-        JsonNode node = resource().path( "/management/users/org.apache.usergrid.test/password" ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, data );
+        JsonNode node = mapper.valueToTree(resource().path( "/management/users/test/password" ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, data ));
 
         assertNull( getError( node ) );
 
-        adminAccessToken = mgmtToken( "org.apache.usergrid.test", newPassword );
+        adminAccessToken = mgmtToken( "test", newPassword );
 
         data.put( "oldpassword", newPassword );
-        data.put( "newpassword", "org.apache.usergrid.test" );
+        data.put( "newpassword", "test" );
 
-        node = resource().path( "/management/users/org.apache.usergrid.test/password" ).queryParam( "access_token", adminAccessToken )
+        node = mapper.valueToTree(resource().path( "/management/users/test/password" ).queryParam( "access_token", adminAccessToken )
                 .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                .post( JsonNode.class, data );
+                .post( HashMap.class, data ));
 
         assertNull( getError( node ) );
     }
@@ -95,8 +95,8 @@ public class ManagementResourceIT extends AbstractRestIT {
         Status responseStatus = null;
 
         try {
-            resource().path( "/management/users/org.apache.usergrid.test/password" ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, data );
+            resource().path( "/management/users/test/password" ).accept( MediaType.APPLICATION_JSON )
+                    .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, data );
         }
         catch ( UniformInterfaceException uie ) {
             responseStatus = uie.getResponse().getClientResponseStatus();
@@ -119,23 +119,23 @@ public class ManagementResourceIT extends AbstractRestIT {
         data.put( "newpassword", newPassword );
 
         // change the password as admin. The old password isn't required
-        JsonNode node = resource().path( "/management/users/org.apache.usergrid.test/password" ).queryParam( "access_token", superToken )
+        JsonNode node = mapper.valueToTree(resource().path( "/management/users/test/password" ).queryParam( "access_token", superToken )
                 .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                .post( JsonNode.class, data );
+                .post( HashMap.class, data ));
 
         assertNull( getError( node ) );
 
         // log in with the new password
-        String token = mgmtToken( "org.apache.usergrid.test", newPassword );
+        String token = mgmtToken( "test", newPassword );
 
         assertNotNull( token );
 
-        data.put( "newpassword", "org.apache.usergrid.test" );
+        data.put( "newpassword", "test" );
 
         // now change the password back
-        node = resource().path( "/management/users/org.apache.usergrid.test/password" ).queryParam( "access_token", superToken )
+        node = mapper.valueToTree(resource().path( "/management/users/test/password" ).queryParam( "access_token", superToken )
                 .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                .post( JsonNode.class, data );
+                .post( HashMap.class, data ));
 
         assertNull( getError( node ) );
     }
@@ -148,14 +148,14 @@ public class ManagementResourceIT extends AbstractRestIT {
         OrganizationOwnerInfo orgInfo = setup.getMgmtSvc().createOwnerAndOrganization( "crossOrgsNotViewable",
                 "crossOrgsNotViewable", "TestName", "crossOrgsNotViewable@usergrid.org", "password" );
 
-        // check that the org.apache.usergrid.test admin cannot access the new org info
+        // check that the test admin cannot access the new org info
 
         Status status = null;
 
         try {
             resource().path( String.format( "/management/orgs/%s", orgInfo.getOrganization().getName() ) )
                     .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                    .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -169,7 +169,7 @@ public class ManagementResourceIT extends AbstractRestIT {
         try {
             resource().path( String.format( "/management/orgs/%s", orgInfo.getOrganization().getUuid() ) )
                     .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                    .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -178,11 +178,11 @@ public class ManagementResourceIT extends AbstractRestIT {
         assertNotNull( status );
         assertEquals( Status.UNAUTHORIZED, status );
 
-        // this admin should have access to org.apache.usergrid.test org
+        // this admin should have access to test org
         status = null;
         try {
-            resource().path( "/management/orgs/org.apache.usergrid.test-organization" ).queryParam( "access_token", adminAccessToken )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+            resource().path( "/management/orgs/test-organization" ).queryParam( "access_token", adminAccessToken )
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -190,13 +190,13 @@ public class ManagementResourceIT extends AbstractRestIT {
 
         assertNull( status );
 
-        OrganizationInfo org = setup.getMgmtSvc().getOrganizationByName( "org.apache.usergrid.test-organization" );
+        OrganizationInfo org = setup.getMgmtSvc().getOrganizationByName( "test-organization" );
 
         status = null;
         try {
             resource().path( String.format( "/management/orgs/%s", org.getUuid() ) )
                     .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                    .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class );
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -208,44 +208,44 @@ public class ManagementResourceIT extends AbstractRestIT {
 
     @Test
     public void mgmtUserFeed() throws Exception {
-        JsonNode userdata = resource().path( "/management/users/org.apache.usergrid.test@usergrid.com/feed" )
+        JsonNode userdata = mapper.valueToTree(resource().path( "/management/users/test@usergrid.com/feed" )
                 .queryParam( "access_token", adminAccessToken ).accept( MediaType.APPLICATION_JSON )
-                .get( JsonNode.class );
+                .get( HashMap.class ));
         assertTrue( StringUtils.contains( this.getEntity( userdata, 0 ).get( "title" ).asText(),
-                "<a href=\"mailto:org.apache.usergrid.test@usergrid.com\">" ) );
+                "<a href=\"mailto:test@usergrid.com\">" ) );
     }
 
 
     @Test
     public void mgmtCreateAndGetApplication() throws Exception {
 
-        OrganizationInfo orgInfo = setup.getMgmtSvc().getOrganizationByName( "org.apache.usergrid.test-organization" );
+        OrganizationInfo orgInfo = setup.getMgmtSvc().getOrganizationByName( "test-organization" );
         Map<String, String> data = new HashMap<String, String>();
         data.put( "name", "mgmt-org-app" );
 
         // POST /applications
-        JsonNode appdata = resource().path( "/management/orgs/" + orgInfo.getUuid() + "/applications" )
+        JsonNode appdata = mapper.valueToTree(resource().path( "/management/orgs/" + orgInfo.getUuid() + "/applications" )
                 .queryParam( "access_token", adminToken() ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, data );
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, data ));
         logNode( appdata );
         appdata = getEntity( appdata, 0 );
 
-        assertEquals( "org.apache.usergrid.test-organization/mgmt-org-app", appdata.get( "name" ).asText() );
+        assertEquals( "test-organization/mgmt-org-app", appdata.get( "name" ).asText() );
         assertEquals( "Roles", appdata.get( "metadata" ).get( "collections" ).get( "roles" ).get( "title" ).asText() );
         assertEquals( 3, appdata.get( "metadata" ).get( "collections" ).get( "roles" ).get( "count" ).asInt() );
 
         // GET /applications/mgmt-org-app
-        appdata = resource().path( "/management/orgs/" + orgInfo.getUuid() + "/applications/mgmt-org-app" )
+        appdata = mapper.valueToTree(resource().path( "/management/orgs/" + orgInfo.getUuid() + "/applications/mgmt-org-app" )
                 .queryParam( "access_token", adminToken() ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         logNode( appdata );
 
-        assertEquals( "org.apache.usergrid.test-organization", appdata.get( "organization" ).asText() );
+        assertEquals( "test-organization", appdata.get( "organization" ).asText() );
         assertEquals( "mgmt-org-app", appdata.get( "applicationName" ).asText() );
-        assertEquals( "http://sometestvalue/org.apache.usergrid.test-organization/mgmt-org-app", appdata.get( "uri" ).asText() );
+        assertEquals( "http://sometestvalue/test-organization/mgmt-org-app", appdata.get( "uri" ).asText() );
         appdata = getEntity( appdata, 0 );
 
-        assertEquals( "org.apache.usergrid.test-organization/mgmt-org-app", appdata.get( "name" ).asText() );
+        assertEquals( "test-organization/mgmt-org-app", appdata.get( "name" ).asText() );
         assertEquals( "Roles", appdata.get( "metadata" ).get( "collections" ).get( "roles" ).get( "title" ).asText() );
         assertEquals( 3, appdata.get( "metadata" ).get( "collections" ).get( "roles" ).get( "count" ).asInt() );
     }
@@ -256,9 +256,9 @@ public class ManagementResourceIT extends AbstractRestIT {
 
         long ttl = 2000;
 
-        JsonNode node = resource().path( "/management/token" ).queryParam( "grant_type", "password" )
-                .queryParam( "username", "org.apache.usergrid.test@usergrid.com" ).queryParam( "password", "org.apache.usergrid.test" )
-                .queryParam( "ttl", String.valueOf( ttl ) ).accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+        JsonNode node = mapper.valueToTree(resource().path( "/management/token" ).queryParam( "grant_type", "password" )
+                .queryParam( "username", "test@usergrid.com" ).queryParam( "password", "test" )
+                .queryParam( "ttl", String.valueOf( ttl ) ).accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
 
         long startTime = System.currentTimeMillis();
 
@@ -266,18 +266,18 @@ public class ManagementResourceIT extends AbstractRestIT {
 
         assertNotNull( token );
 
-        JsonNode userdata = resource().path( "/management/users/org.apache.usergrid.test@usergrid.com" ).queryParam( "access_token", token )
-                .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+        JsonNode userdata = mapper.valueToTree(resource().path( "/management/users/test@usergrid.com" ).queryParam( "access_token", token )
+                .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
 
-        assertEquals( "org.apache.usergrid.test@usergrid.com", userdata.get( "data" ).get( "email" ).asText() );
+        assertEquals( "test@usergrid.com", userdata.get( "data" ).get( "email" ).asText() );
 
         // wait for the token to expire
         Thread.sleep( ttl - ( System.currentTimeMillis() - startTime ) + 1000 );
 
         Status responseStatus = null;
         try {
-            userdata = resource().path( "/management/users/org.apache.usergrid.test@usergrid.com" ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+            userdata = mapper.valueToTree(resource().path( "/management/users/test@usergrid.com" ).accept( MediaType.APPLICATION_JSON )
+                    .type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         }
         catch ( UniformInterfaceException uie ) {
             responseStatus = uie.getResponse().getClientResponseStatus();
@@ -289,9 +289,9 @@ public class ManagementResourceIT extends AbstractRestIT {
 
     @Test
     public void token() throws Exception {
-        JsonNode node = resource().path( "/management/token" ).queryParam( "grant_type", "password" )
-                .queryParam( "username", "org.apache.usergrid.test@usergrid.com" ).queryParam( "password", "org.apache.usergrid.test" )
-                .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+        JsonNode node = mapper.valueToTree(resource().path( "/management/token" ).queryParam( "grant_type", "password" )
+                .queryParam( "username", "test@usergrid.com" ).queryParam( "password", "test" )
+                .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
 
         logNode( node );
         String token = node.get( "access_token" ).asText();
@@ -302,13 +302,13 @@ public class ManagementResourceIT extends AbstractRestIT {
         Map<String, Object> properties = new HashMap<String, Object>();
         properties.put( "securityLevel", 5 );
         payload.put( OrganizationsResource.ORGANIZATION_PROPERTIES, properties );
-        node = resource().path( "/management/organizations/org.apache.usergrid.test-organization" )
+        node = mapper.valueToTree(resource().path( "/management/organizations/test-organization" )
                 .queryParam( "access_token", superAdminToken() ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).put( JsonNode.class, payload );
+                .type( MediaType.APPLICATION_JSON_TYPE ).put( HashMap.class, payload ));
 
         // ensure the organization property is included
-        node = resource().path( "/management/token" ).queryParam( "access_token", token )
-                .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( "/management/token" ).queryParam( "access_token", token )
+                .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
         logNode( node );
 
         JsonNode securityLevel = node.findValue( "securityLevel" );
@@ -319,16 +319,16 @@ public class ManagementResourceIT extends AbstractRestIT {
 
     @Test
     public void meToken() throws Exception {
-        JsonNode node = resource().path( "/management/me" ).queryParam( "grant_type", "password" )
-                .queryParam( "username", "org.apache.usergrid.test@usergrid.com" ).queryParam( "password", "org.apache.usergrid.test" )
-                .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+        JsonNode node = mapper.valueToTree(resource().path( "/management/me" ).queryParam( "grant_type", "password" )
+                .queryParam( "username", "test@usergrid.com" ).queryParam( "password", "test" )
+                .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
 
         logNode( node );
         String token = node.get( "access_token" ).asText();
         assertNotNull( token );
 
-        node = resource().path( "/management/me" ).queryParam( "access_token", token )
-                .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( "/management/me" ).queryParam( "access_token", token )
+                .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
         logNode( node );
 
         assertNotNull( node.get( "passwordChanged" ) );
@@ -343,7 +343,7 @@ public class ManagementResourceIT extends AbstractRestIT {
         assertNotNull( userNode.get( "properties" ) );
         JsonNode orgsNode = userNode.get( "organizations" );
         assertNotNull( orgsNode );
-        JsonNode orgNode = orgsNode.get( "org.apache.usergrid.test-organization" );
+        JsonNode orgNode = orgsNode.get( "test-organization" );
         assertNotNull( orgNode );
         assertNotNull( orgNode.get( "name" ) );
         assertNotNull( orgNode.get( "properties" ) );
@@ -353,18 +353,18 @@ public class ManagementResourceIT extends AbstractRestIT {
     @Test
     public void meTokenPost() throws Exception {
         Map<String, String> payload =
-                hashMap( "grant_type", "password" ).map( "username", "org.apache.usergrid.test@usergrid.com" ).map( "password", "org.apache.usergrid.test" );
+                hashMap( "grant_type", "password" ).map( "username", "test@usergrid.com" ).map( "password", "test" );
 
-        JsonNode node = resource().path( "/management/me" ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, payload );
+        JsonNode node = mapper.valueToTree(resource().path( "/management/me" ).accept( MediaType.APPLICATION_JSON )
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, payload ));
 
         logNode( node );
         String token = node.get( "access_token" ).asText();
 
         assertNotNull( token );
 
-        node = resource().path( "/management/me" ).queryParam( "access_token", token )
-                .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( "/management/me" ).queryParam( "access_token", token )
+                .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
         logNode( node );
     }
 
@@ -374,21 +374,21 @@ public class ManagementResourceIT extends AbstractRestIT {
 
         Form form = new Form();
         form.add( "grant_type", "password" );
-        form.add( "username", "org.apache.usergrid.test@usergrid.com" );
-        form.add( "password", "org.apache.usergrid.test");
+        form.add( "username", "test@usergrid.com" );
+        form.add( "password", "test");
 
-        JsonNode node = resource().path( "/management/me" )
+        JsonNode node = mapper.valueToTree(resource().path( "/management/me" )
                 .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_FORM_URLENCODED_TYPE )
                 .entity( form, MediaType.APPLICATION_FORM_URLENCODED_TYPE )
-                .post( JsonNode.class );
+                .post( HashMap.class ));
 
         logNode( node );
         String token = node.get( "access_token" ).asText();
 
         assertNotNull( token );
 
-        node = resource().path( "/management/me" ).queryParam( "access_token", token )
-                .accept( MediaType.APPLICATION_JSON ).get( JsonNode.class );
+        node = mapper.valueToTree(resource().path( "/management/me" ).queryParam( "access_token", token )
+                .accept( MediaType.APPLICATION_JSON ).get( HashMap.class ));
         logNode( node );
     }
 
@@ -397,13 +397,13 @@ public class ManagementResourceIT extends AbstractRestIT {
     public void ttlNan() throws Exception {
 
         Map<String, String> payload =
-                hashMap( "grant_type", "password" ).map( "username", "org.apache.usergrid.test@usergrid.com" ).map( "password", "org.apache.usergrid.test" )
+                hashMap( "grant_type", "password" ).map( "username", "test@usergrid.com" ).map( "password", "test" )
                         .map( "ttl", "derp" );
 
         Status responseStatus = null;
         try {
             resource().path( "/management/token" ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, payload );
+                    .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, payload );
         }
         catch ( UniformInterfaceException uie ) {
             responseStatus = uie.getResponse().getClientResponseStatus();
@@ -417,14 +417,14 @@ public class ManagementResourceIT extends AbstractRestIT {
     public void ttlOverMax() throws Exception {
 
         Map<String, String> payload =
-                hashMap( "grant_type", "password" ).map( "username", "org.apache.usergrid.test@usergrid.com" ).map( "password", "org.apache.usergrid.test" )
+                hashMap( "grant_type", "password" ).map( "username", "test@usergrid.com" ).map( "password", "test" )
                         .map( "ttl", Long.MAX_VALUE + "" );
 
         Status responseStatus = null;
 
         try {
             resource().path( "/management/token" ).accept( MediaType.APPLICATION_JSON )
-                    .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class, payload );
+                    .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class, payload );
         }
         catch ( UniformInterfaceException uie ) {
             responseStatus = uie.getResponse().getClientResponseStatus();
@@ -439,29 +439,29 @@ public class ManagementResourceIT extends AbstractRestIT {
         String token1 = super.adminToken();
         String token2 = super.adminToken();
 
-        JsonNode response = resource().path( "/management/users/org.apache.usergrid.test" ).queryParam( "access_token", token1 )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        JsonNode response = mapper.valueToTree(resource().path( "/management/users/test" ).queryParam( "access_token", token1 )
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
-        assertEquals( "org.apache.usergrid.test@usergrid.com", response.get( "data" ).get( "email" ).asText() );
+        assertEquals( "test@usergrid.com", response.get( "data" ).get( "email" ).asText() );
 
-        response = resource().path( "/management/users/org.apache.usergrid.test" ).queryParam( "access_token", token2 )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        response = mapper.valueToTree(resource().path( "/management/users/test" ).queryParam( "access_token", token2 )
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
-        assertEquals( "org.apache.usergrid.test@usergrid.com", response.get( "data" ).get( "email" ).asText() );
+        assertEquals( "test@usergrid.com", response.get( "data" ).get( "email" ).asText() );
 
         // now revoke the tokens
         response =
-                resource().path( "/management/users/org.apache.usergrid.test/revoketokens" ).queryParam( "access_token", superAdminToken() )
+                mapper.valueToTree(resource().path( "/management/users/test/revoketokens" ).queryParam( "access_token", superAdminToken() )
                         .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
-                        .post( JsonNode.class );
+                        .post( HashMap.class ));
 
         // the tokens shouldn't work
 
         Status status = null;
 
         try {
-            response = resource().path( "/management/users/org.apache.usergrid.test" ).queryParam( "access_token", token1 )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+            response = mapper.valueToTree(resource().path( "/management/users/test" ).queryParam( "access_token", token1 )
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -472,8 +472,8 @@ public class ManagementResourceIT extends AbstractRestIT {
         status = null;
 
         try {
-            response = resource().path( "/management/users/org.apache.usergrid.test" ).queryParam( "access_token", token2 )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+            response = mapper.valueToTree(resource().path( "/management/users/test" ).queryParam( "access_token", token2 )
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -484,28 +484,28 @@ public class ManagementResourceIT extends AbstractRestIT {
         String token3 = super.adminToken();
         String token4 = super.adminToken();
 
-        response = resource().path( "/management/users/org.apache.usergrid.test" ).queryParam( "access_token", token3 )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        response = mapper.valueToTree(resource().path( "/management/users/test" ).queryParam( "access_token", token3 )
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
-        assertEquals( "org.apache.usergrid.test@usergrid.com", response.get( "data" ).get( "email" ).asText() );
+        assertEquals( "test@usergrid.com", response.get( "data" ).get( "email" ).asText() );
 
-        response = resource().path( "/management/users/org.apache.usergrid.test" ).queryParam( "access_token", token4 )
-                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+        response = mapper.valueToTree(resource().path( "/management/users/test" ).queryParam( "access_token", token4 )
+                .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
-        assertEquals( "org.apache.usergrid.test@usergrid.com", response.get( "data" ).get( "email" ).asText() );
+        assertEquals( "test@usergrid.com", response.get( "data" ).get( "email" ).asText() );
 
         // now revoke the token3
-        response = resource().path( "/management/users/org.apache.usergrid.test/revoketoken" ).queryParam( "access_token", token3 )
+        response = mapper.valueToTree(resource().path( "/management/users/test/revoketoken" ).queryParam( "access_token", token3 )
                 .queryParam( "token", token3 ).accept( MediaType.APPLICATION_JSON )
-                .type( MediaType.APPLICATION_JSON_TYPE ).post( JsonNode.class );
+                .type( MediaType.APPLICATION_JSON_TYPE ).post( HashMap.class ));
 
         // the token3 shouldn't work
 
         status = null;
 
         try {
-            response = resource().path( "/management/users/org.apache.usergrid.test" ).queryParam( "access_token", token3 )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+            response = mapper.valueToTree(resource().path( "/management/users/test" ).queryParam( "access_token", token3 )
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
         }
         catch ( UniformInterfaceException uie ) {
             status = uie.getResponse().getClientResponseStatus();
@@ -516,8 +516,8 @@ public class ManagementResourceIT extends AbstractRestIT {
         status = null;
 
         try {
-            response = resource().path( "/management/users/org.apache.usergrid.test" ).queryParam( "access_token", token4 )
-                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( JsonNode.class );
+            response = mapper.valueToTree(resource().path( "/management/users/test" ).queryParam( "access_token", token4 )
+                    .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE ).get( HashMap.class ));
 
             status = Status.OK;
         }


Mime
View raw message