You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/07/15 19:28:21 UTC

[4/8] incubator-usergrid git commit: remove old test framework

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Collection.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Collection.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Collection.java
new file mode 100644
index 0000000..aba05a1
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Collection.java
@@ -0,0 +1,98 @@
+/**
+ * Created by ApigeeCorporation on 12/4/14.
+ */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.usergrid.rest.test.resource.model;
+
+import java.util.Iterator;
+import java.util.Map;
+
+
+/**
+ * A stateful iterable collection response. Used to dole out entities in iterable form
+ *
+ */
+public class Collection implements Iterable<Entity>, Iterator<Entity> {
+
+
+    private String cursor;
+
+    private Iterator entities;
+
+    private ApiResponse response;
+
+    //TODO: implement way to have the collection store its own name?
+    private String name;
+
+
+
+    /**
+     * Collection usersCollection =  app.collection("users").get();
+     * while(usersCollection.hasNext()){
+     *  Entity bob = usersCollection.next();
+     *     assert("blah",bob.get("words"));
+     * }
+     * QueryParams = new QueryParams(usersCollection.cursor)
+     * app.collections("users").get(queryParams);
+     *
+     * usersCollection = app.collections("users").getNextPage(usersCollection.cursor);
+     *
+     * Use the factory method instead
+     * @param response
+     */
+    public Collection(ApiResponse response) {
+        this.response = response;
+        this.cursor = response.getCursor();
+        this.entities = response.getEntities()!=null?  response.getEntities().iterator():null;
+    }
+
+    @Override
+    public Iterator iterator() {
+        return this;
+    }
+
+
+    @Override
+    public boolean hasNext() {
+        return entities.hasNext();
+    }
+
+    public String getCursor(){
+        return cursor;
+    }
+
+
+    @Override
+    public Entity next() {
+        return new Entity( ( Map<String, Object> ) entities.next() );
+    }
+
+    @Override
+    public void remove() {
+        throw new UnsupportedOperationException( "Remove is unsupported" );
+    }
+
+    public int getNumOfEntities(){
+        return response.getEntityCount();
+    }
+
+    public ApiResponse getResponse(){return response;}
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Credentials.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Credentials.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Credentials.java
new file mode 100644
index 0000000..0a71ae9
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Credentials.java
@@ -0,0 +1,47 @@
+/*
+ *
+ *  * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  *  contributor license agreements.  The ASF licenses this file to You
+ *  * under the Apache License, Version 2.0 (the "License"); you may not
+ *  * use this file except in compliance with the License.
+ *  * You may obtain a copy of the License at
+ *  *
+ *  *     http://www.apache.org/licenses/LICENSE-2.0
+ *  *
+ *  * Unless required by applicable law or agreed to in writing, software
+ *  * distributed under the License is distributed on an "AS IS" BASIS,
+ *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  * See the License for the specific language governing permissions and
+ *  * limitations under the License.  For additional information regarding
+ *  * copyright in this work, please see the NOTICE file in the top level
+ *  * directory of this distribution.
+ *
+ */
+
+package org.apache.usergrid.rest.test.resource.model;
+
+import java.util.Map;
+
+/**
+ */
+public class Credentials extends Entity {
+    public Credentials() {
+    }
+
+    public Credentials(ApiResponse response) {
+        setResponse(response, "credentials");
+    }
+
+    public Credentials mapOrgResponse(Map<String, Object> map) {
+        putAll((Map<String, Object>) map.get("credentials"));
+        return this;
+    }
+
+    public String getClientSecret() {
+        return (String) get("client_secret");
+    }
+
+    public String getClientId() {
+        return (String) get("client_id");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Entity.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Entity.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Entity.java
new file mode 100644
index 0000000..3707967
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Entity.java
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.usergrid.rest.test.resource.model;
+
+import java.io.Serializable;
+import java.util.*;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+import static org.apache.usergrid.persistence.Schema.PROPERTY_NAME;
+
+
+/**
+ * Contains a model that can be deconstructed from the api response. This is a base level value that contains the bare
+ * minumum of what other classes use. Such as . users or groups.
+ */
+public class Entity implements Serializable, Map<String,Object> {
+
+
+    protected Map<String, Object> dynamic_properties = new TreeMap<String, Object>( String.CASE_INSENSITIVE_ORDER );
+
+    ApiResponse response;
+
+    public Entity(){}
+
+    public Entity (Map<String,Object> payload){
+        this.putAll(payload);
+    }
+
+    public Entity(ApiResponse response){
+        this.response = response;
+
+        if(response.getEntities() != null &&  response.getEntities().size()>=1){
+            List<Entity>  entities =  response.getEntities();
+            Map<String,Object> entity = entities.get(0);
+            this.putAll(entity);
+        }
+        else if (response.getData() != null){
+
+            if(response.getData() instanceof  LinkedHashMap) {
+                LinkedHashMap dataResponse = ( LinkedHashMap ) response.getData();
+
+                if(dataResponse.get( "user" )!=null){
+                    this.putAll( ( Map<? extends String, ?> ) dataResponse.get( "user" ) );
+                }
+                else{
+                    this.putAll( dataResponse );
+                }
+            }
+            else if (response.getData() instanceof ArrayList){
+                ArrayList<String> data = ( ArrayList<String> ) response.getData();
+                Entity entity = new Entity();
+                entity.put( "data", data.get( 0 ) );
+                this.putAll( entity );
+            }
+        }
+        //TODO: added bit for import tests and other tests that only put a single thing into properties
+        else if (response.getProperties() != null){
+            this.putAll( response.getProperties() );
+        }
+    }
+
+    //For the owner , should have different cases that looks at the different types it could be
+    protected Entity setResponse(final ApiResponse response, String key) {
+        LinkedHashMap linkedHashMap = (LinkedHashMap) response.getData();
+
+        if(linkedHashMap == null){
+            linkedHashMap =  new LinkedHashMap( response.getProperties());
+        }
+
+        this.putAll((Map<? extends String, ?>) linkedHashMap.get(key));
+
+        return this;
+    }
+
+    public void setProperties( Map<String, Object> properties ) {
+        putAll( properties );
+    }
+
+    public Map<String, Object> getDynamicProperties() {
+        return dynamic_properties;
+    }
+
+    @Override
+    public int size() {
+        return getDynamicProperties().size();
+    }
+
+
+    @Override
+    public boolean isEmpty() {
+        return getDynamicProperties().isEmpty();
+    }
+
+
+    @Override
+    public boolean containsKey( final Object key ) {
+        return getDynamicProperties().containsKey( key );
+    }
+
+
+    @Override
+    public boolean containsValue( final Object value ) {
+        return getDynamicProperties().containsValue( value );
+    }
+
+
+    @Override
+    public Object get( final Object key ) {
+        //All values are strings , so doing the cast here saves doing the cast elsewhere
+        return getDynamicProperties().get( key );
+    }
+
+
+    public Map<String, Map<String, Object>> getMap(Object key){
+        return (LinkedHashMap<String, Map<String, Object>>) getDynamicProperties().get( key );
+    }
+
+    public String getAsString( final Object key ) {
+        //All values are strings , so doing the cast here saves doing the cast elsewhere
+        return (String) getDynamicProperties().get( key );
+    }
+
+    public String getError () {
+        return (String) this.get("error");
+    }
+
+    public String getErrorCode () {
+        return (String)this.get("errorCode");
+    }
+
+    public String getErrorDescription () {
+        return (String) this.get("errorDescription");
+    }
+
+    @Override
+    public Object put( final String key, final Object value ) {
+        return getDynamicProperties().put( key,value );
+    }
+
+
+    @Override
+    public Object remove( final Object key ) {
+        return getDynamicProperties().remove( key );
+    }
+
+
+    @Override
+    public void putAll( final Map<? extends String, ?> m ) {
+        getDynamicProperties().putAll( m );
+    }
+
+
+    @Override
+    public void clear() {
+        getDynamicProperties().clear();
+    }
+
+
+    @Override
+    public Set<String> keySet() {
+        return getDynamicProperties().keySet();
+    }
+
+
+    @Override
+    public java.util.Collection<Object> values() {
+        return getDynamicProperties().values();
+    }
+
+
+    @Override
+    public Set<Entry<String, Object>> entrySet() {
+        return getDynamicProperties().entrySet();
+    }
+
+    public UUID getUuid(){
+        return UUID.fromString( ( String ) get( "uuid" ) );
+    }
+
+    public Entity chainPut(final String key, final Object value){
+        put(key,value);
+        return this;
+    }
+
+    public Entity withProp(final String key, final Object value){
+        put(key,value);
+        return this;
+    }
+
+    public ApiResponse getResponse(){
+        return response;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Organization.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Organization.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Organization.java
new file mode 100644
index 0000000..04709a5
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Organization.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.usergrid.rest.test.resource.model;
+
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+
+
+/**
+ * Holds the parsed out information of the Organization returned from the ApiResponse.
+ * so when you get the organization object, we could then model it out to do the client calls
+ */
+public class Organization extends Entity {
+
+    private User user;
+
+    public Organization() {
+
+    }
+
+    public Organization( String orgName, String username, String email, String ownerName, String password, Map<String,Object> properties ){
+
+        this.put( "organization", orgName );
+        this.put( "username", username);
+        this.put( "email", email);
+        //TODO: create clearer distinction between ownerName and username in the backend.
+        this.put( "name", ownerName);
+        this.put( "password", password);
+
+        if(properties != null)
+            setProperties( properties );
+    }
+
+    public Organization(ApiResponse response){
+        setResponse( response, "organization" );
+    }
+
+    @JsonSerialize( include = JsonSerialize.Inclusion.NON_NULL )
+    public String getOrganization( ) {
+        return ( String ) this.get( "organization" );
+    }
+
+    @JsonSerialize( include = JsonSerialize.Inclusion.NON_NULL )
+    public String getUsername() {
+        return ( String ) this.get( "username" );
+    }
+
+    @JsonSerialize( include = JsonSerialize.Inclusion.NON_NULL )
+    public String getEmail() {
+        return ( String ) this.get( "email" );
+    }
+
+    @JsonSerialize( include = JsonSerialize.Inclusion.NON_NULL )
+    public String getName() {
+        return ( String ) this.get( "name" );
+    }
+
+    @JsonSerialize( include = JsonSerialize.Inclusion.NON_NULL )
+    public String getPassword() {
+        return ( String ) this.get( "password" );
+    }
+
+    public Object getPasswordHistorySize() {
+        return  (Integer) this.get("passwordHistorySize");
+    }
+
+    public User getOwner(){
+        return user;
+    }
+
+    public void setOwner(ApiResponse response){
+        setOwner( response, "owner" );
+    }
+
+    public void setOwner(ApiResponse response, String nameOverride){
+        this.user = new User( response, nameOverride);
+    }
+
+    public Map<String,Object> getProperties(){
+        return (Map) this.get( "properties" );
+    }
+
+    /**
+     * Created specifically so that we could set the organization owner to the Organization model from a get Organization
+     * call. This call is hidden a few layers below and stored in the properties.
+     * @param response
+     */
+    public void setUserOwner(ApiResponse response){
+        LinkedHashMap orgHashMap = ( LinkedHashMap ) response.getProperties().get( "organization" );
+        LinkedHashMap userHashMap = (LinkedHashMap) orgHashMap.get( "users" );
+        //this gets the first value in the users entities and returns it .
+        if(userHashMap.keySet().iterator().hasNext())
+            this.user = new User( ( Map<String, Object> ) userHashMap.get( userHashMap.keySet().iterator().next() ) );
+        //new User().mapOrgGetResponse(orgHashMap.get( "users" ));
+    }
+
+    public Organization mapOrgResponse(Map<String,Object> map){
+        putAll((Map<String, Object>) map.get("organization"));
+        return this;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/QueryParameters.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/QueryParameters.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/QueryParameters.java
new file mode 100644
index 0000000..5717ffd
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/QueryParameters.java
@@ -0,0 +1,93 @@
+/*
+ *
+ *  * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  *  contributor license agreements.  The ASF licenses this file to You
+ *  * under the Apache License, Version 2.0 (the "License"); you may not
+ *  * use this file except in compliance with the License.
+ *  * You may obtain a copy of the License at
+ *  *
+ *  *     http://www.apache.org/licenses/LICENSE-2.0
+ *  *
+ *  * Unless required by applicable law or agreed to in writing, software
+ *  * distributed under the License is distributed on an "AS IS" BASIS,
+ *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  * See the License for the specific language governing permissions and
+ *  * limitations under the License.  For additional information regarding
+ *  * copyright in this work, please see the NOTICE file in the top level
+ *  * directory of this distribution.
+ *
+ */
+
+package org.apache.usergrid.rest.test.resource.model;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.usergrid.services.ServiceParameter;
+
+
+/**
+ * Classy class class.
+ */
+public class QueryParameters {
+    private String query;
+    private String cursor;
+    private UUID start;
+    private Integer limit;
+    private Map<String,String> formPostData = new HashMap<String,String>(  );
+
+    public QueryParameters() {
+    }
+
+    public UUID getStart() {
+        return start;
+    }
+
+    public QueryParameters setStart(UUID start) {
+        this.start = start;
+        return this;
+    }
+
+    public String getCursor() {
+        return cursor;
+    }
+
+    public QueryParameters setCursor(String cursor) {
+        this.cursor = cursor;
+        return this;
+    }
+
+    public String getQuery() {
+        return query;
+    }
+
+    public QueryParameters setQuery(String query) {
+        this.query = query;
+        return this;
+    }
+
+    public Integer getLimit() {
+        return limit;
+    }
+
+    public QueryParameters setLimit(int limit) {
+        this.limit = new Integer(limit);
+        return this;
+    }
+
+    public Map<String,String> getFormPostData(){
+        return formPostData;
+    }
+
+    public QueryParameters setKeyValue(String key, String value){
+        this.formPostData.put(key,value);
+        return this;
+    }
+
+
+    public QueryParameters addParam(String key, String value) {
+        formPostData.put(key,value);
+        return this;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Token.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Token.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Token.java
new file mode 100644
index 0000000..92b91ee
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/Token.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.rest.test.resource.model;
+
+
+import java.util.LinkedHashMap;
+
+/**
+ * Token model that contains the operations that can be done on a token.
+ */
+public class Token extends Entity {
+
+    private User user;
+
+    public Token() {
+
+    }
+
+    public Token(String username, String password) {
+        this.put("grant_type", "password");
+        this.put("username", username);
+        this.put("password", password);
+    }
+
+    /**
+     * Constructor for admin/application user ( difference is in the path )
+     *
+     * @param grantType
+     * @param username
+     * @param password
+     */
+    public Token(String grantType, String username, String password) {
+        this.put("grant_type", grantType);
+        if ("client_credentials".equals(grantType)) {
+            this.put("client_id", username);
+            this.put("client_secret", password);
+        } else {
+            this.put("username", username);
+            this.put("password", password);
+        }
+    }
+
+    public String getAccessToken() {
+        return (String) this.get("access_token");
+    }
+
+    public String getGrantType() {
+        return (String) this.get("grant_type");
+    }
+
+    public Long getExpirationDate() {
+        return ((Integer) this.get("expires_in")).longValue();
+    }
+
+    public Long getPasswordChanged() {
+        return (Long) this.get("passwordChanged");
+    }
+
+    public void setUser(User user) {
+        this.user = user;
+    }
+
+    public User getUser() {
+        return user != null ? user : new User((LinkedHashMap) get("user"));
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/User.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/User.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/User.java
new file mode 100644
index 0000000..d2b8b77
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/model/User.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.rest.test.resource.model;
+
+
+import java.util.Map;
+import java.util.UUID;
+
+
+/**
+ * Models the user class for response from REST calls.
+ */
+public class User extends Entity {
+
+
+    public User(){}
+    /**
+     * This could also be a user
+     * @param response
+     */
+
+    public User (ApiResponse response, String dataName){
+        setResponse( response, dataName );
+    }
+
+    //TODO: create another constructor to take in the nessesary things to post to a user.
+
+    public User(String username, String name, String email, String password){
+        this.put( "username",username );
+        this.put( "name", name);
+        this.put( "email", email);
+        this.put( "password", password);
+    }
+
+    public User(Map<String,Object> map){
+        this.putAll( map );
+    }
+
+    public Boolean getActivated(){
+        return (Boolean) this.get( "activated" );
+    }
+
+    public Boolean getAdminUser(){
+        return (Boolean) this.get( "adminUser" );
+    }
+
+    public UUID getApplicationId(){
+        return  UUID.fromString( (String) get("applicationId") );
+    }
+
+    public Boolean getConfirmed(){
+        return (Boolean) this.get("confirmed");
+    }
+
+    public Boolean getDisabled(){
+        return (Boolean) this.get("disabled");
+    }
+
+    public String getDisplayEmailAddress(){
+        return (String) this.get("displayEmailAddress");
+    }
+
+    public String getEmail(){
+        return (String) this.get("email");
+    }
+
+    public String getHtmlDisplayEmailAddress(){
+        return (String) this.get("htmldisplayEmailAddress");
+    }
+
+    public String getName(){
+        return (String) this.get("name");
+    }
+
+    public Map<String,Object> getProperties(){
+        return (Map<String,Object>) this.get("properties");
+    }
+
+    public String getUsername(){
+        return (String) this.get("username");
+    }
+
+    public UUID getUuid(){
+        return UUID.fromString( (String) get("uuid") );
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/state/ClientContext.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/state/ClientContext.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/state/ClientContext.java
new file mode 100644
index 0000000..4d1843d
--- /dev/null
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/state/ClientContext.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.usergrid.rest.test.resource.state;
+
+
+import org.apache.usergrid.rest.test.resource.model.Token;
+
+
+/**
+ * Context to hold client stateful information
+ * This includes token,orgName and uuid, appName and uuid, and user information
+ */
+public class ClientContext {
+    private Token token;
+
+    public Token getToken() {
+        return token;
+    }
+
+
+    public void setToken( final Token token ) {
+        this.token = token;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java
deleted file mode 100644
index a7cf04a..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/AbstractRestIT.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.rest.test.resource2point0;
-
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.sun.jersey.api.client.UniformInterfaceException;
-import com.sun.jersey.api.client.config.ClientConfig;
-import com.sun.jersey.api.client.config.DefaultClientConfig;
-import com.sun.jersey.api.json.JSONConfiguration;
-import com.sun.jersey.test.framework.AppDescriptor;
-import com.sun.jersey.test.framework.JerseyTest;
-import com.sun.jersey.test.framework.WebAppDescriptor;
-import com.sun.jersey.test.framework.spi.container.TestContainerFactory;
-import org.apache.usergrid.rest.TomcatRuntime;
-import org.apache.usergrid.rest.test.resource2point0.endpoints.ApplicationsResource;
-import org.apache.usergrid.rest.test.resource2point0.endpoints.NamedResource;
-import org.apache.usergrid.rest.test.resource2point0.endpoints.OrganizationResource;
-import org.apache.usergrid.rest.test.resource2point0.endpoints.mgmt.ManagementResource;
-import org.apache.usergrid.rest.test.resource2point0.model.Token;
-import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
-import org.junit.Rule;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URLClassLoader;
-import java.util.Arrays;
-
-import static org.junit.Assert.assertEquals;
-
-
-
-/**
- * Base class for REST tests.
- */
-//@RunWith( Arquillian.class )
-public class AbstractRestIT extends JerseyTest {
-
-    private static ClientConfig clientConfig = new DefaultClientConfig();
-
-    public static TomcatRuntime tomcatRuntime = TomcatRuntime.getInstance();
-
-    @Rule
-    public ClientSetup clientSetup = new ClientSetup( this.getBaseURI().toString() );
-
-    protected static final AppDescriptor descriptor;
-
-    public AbstractRestIT() {
-        super( descriptor );
-    }
-
-
-    protected ObjectMapper mapper = new ObjectMapper();
-
-    static {
-        clientConfig.getFeatures().put( JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE );
-        descriptor = new WebAppDescriptor.Builder( "org.apache.usergrid.rest" )
-                .clientConfig( clientConfig ).build();
-        dumpClasspath( AbstractRestIT.class.getClassLoader() );
-    }
-
-
-//    //We set testable = false so we deploy the archive to the server and test it locally
-//    @Deployment( testable = false )
-//    public static WebArchive createTestArchive() {
-//
-//        //we use the MavenImporter from shrinkwrap to just produce whatever maven would build then test with it
-//
-//        //set maven to be in offline mode
-//
-//        System.setProperty( "org.apache.maven.offline", "true" );
-//
-//        return ShrinkWrap.create( MavenImporter.class ).loadPomFromFile( "pom.xml", "arquillian-tomcat" )
-//                         .importBuildOutput().as( WebArchive.class );
-//    }
-
-    public static void dumpClasspath( ClassLoader loader ) {
-        System.out.println( "Classloader " + loader + ":" );
-
-        if ( loader instanceof URLClassLoader ) {
-            URLClassLoader ucl = ( URLClassLoader ) loader;
-            System.out.println( "\t" + Arrays.toString( ucl.getURLs() ) );
-        }
-        else {
-            System.out.println( "\t(cannot display components as not a URLClassLoader)" );
-        }
-
-        if ( loader.getParent() != null ) {
-            dumpClasspath( loader.getParent() );
-        }
-    }
-
-    @Override
-    protected URI getBaseURI() {
-        try {
-            return new URI("http://localhost:" + tomcatRuntime.getPort());
-        } catch (URISyntaxException e) {
-            throw new RuntimeException("Error determining baseURI", e);
-        }
-    }
-
-    @Override
-    protected TestContainerFactory getTestContainerFactory() {
-        return new com.sun.jersey.test.framework.spi.container.external.ExternalTestContainerFactory();
-    }
-
-    ///myorg/
-    protected OrganizationResource org(){
-        return clientSetup.restClient.org( clientSetup.getOrganization().getName() );
-    }
-
-    //myorg/myapp
-    protected ApplicationsResource app(){
-        return clientSetup.restClient.org(clientSetup.getOrganization().getName()).app(clientSetup.getAppName());
-
-    }
-
-    protected ManagementResource management(){
-        return clientSetup.restClient.management();
-    }
-
-    protected NamedResource pathResource(String path){ return clientSetup.restClient.pathResource(path);}
-
-    protected String getOrgAppPath(String additionalPath){
-        return clientSetup.orgName + "/" + clientSetup.appName + "/" + (additionalPath !=null ? additionalPath : "");
-    }
-
-    protected ClientContext context(){
-        return this.clientSetup.getRestClient().getContext();
-    }
-
-
-    protected Token getAppUserToken(String username, String password){
-        return this.app().token().post(new Token(username,password));
-    }
-
-    public void refreshIndex() {
-        //TODO: add error checking and logging
-        clientSetup.refreshIndex();
-    }
-
-
-    /**
-     * Takes in the expectedStatus message and the expectedErrorMessage then compares it to the UniformInterfaceException
-     * to make sure that we got what we expected.
-     * @param expectedStatus
-     * @param expectedErrorMessage
-     * @param uie
-     */
-    public void errorParse(int expectedStatus, String expectedErrorMessage, UniformInterfaceException uie){
-        assertEquals(expectedStatus,uie.getResponse().getStatus());
-        JsonNode errorJson = uie.getResponse().getEntity( JsonNode.class );
-        assertEquals( expectedErrorMessage, errorJson.get( "error" ).asText() );
-
-    }
-
-
-    protected Token getAdminToken(String username, String password){
-        return this.clientSetup.getRestClient().management().token().post(false,Token.class,
-                new Token(username, password),null,false
-        );
-    }
-
-    protected Token getAdminToken(){
-        return this.clientSetup.getRestClient().management().token().post(false,Token.class,
-                new Token(this.clientSetup.getUsername(),this.clientSetup.getUsername()),null,false
-        );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
deleted file mode 100644
index be0e28d..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * Created by ApigeeCorporation on 12/4/14.
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.usergrid.rest.test.resource2point0;
-
-
-import org.apache.usergrid.corepersistence.util.CpNamingUtils;
-import org.apache.usergrid.persistence.index.utils.UUIDUtils;
-import org.apache.usergrid.rest.test.resource2point0.model.*;
-import org.junit.rules.TestRule;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-
-
-/**
- * This class is used to setup the client rule that will setup the RestClient and create default applications.
- */
-public class ClientSetup implements TestRule {
-
-    private Logger logger = LoggerFactory.getLogger( ClientSetup.class );
-
-    RestClient restClient;
-
-    protected String username;
-    protected String password;
-    protected String orgName;
-    protected String appName;
-    protected String appUuid;
-    protected Token superuserToken;
-    protected String superuserName = "superuser";
-    protected String superuserPassword = "superpassword";
-    protected Credentials clientCredentials;
-
-    protected Organization organization;
-    protected Entity application;
-
-
-    public ClientSetup (String serverUrl) {
-
-        restClient = new RestClient( serverUrl );
-    }
-
-    public Statement apply( Statement base, Description description ) {
-        return statement( base, description );
-    }
-
-
-    private Statement statement( final Statement base, final Description description ) {
-        return new Statement() {
-            @Override
-            public void evaluate() throws Throwable {
-                before( description );
-                try {
-                    base.evaluate();
-                }
-                finally {
-                    cleanup();
-                }
-            }
-        };
-    }
-
-
-    protected void cleanup() {
-        // might want to do something here later
-    }
-
-
-    protected void before( Description description ) throws IOException {
-        String testClass = description.getTestClass().getName();
-        String methodName = description.getMethodName();
-        String name = testClass + "." + methodName;
-
-        try {
-            restClient.superuserSetup();
-            superuserToken = restClient.management().token().get(superuserName, superuserPassword);
-        } catch ( Exception e ) {
-            if ( logger.isDebugEnabled() ) {
-                logger.debug( "Error creating superuser, may already exist", e );
-            } else {
-                logger.warn( "Error creating superuser, may already exist");
-            }
-        }
-
-        username = "user_"+name + UUIDUtils.newTimeUUID();
-        password = username;
-        orgName = "org_"+name+UUIDUtils.newTimeUUID();
-        appName = "app_"+name+UUIDUtils.newTimeUUID();
-
-        organization = restClient.management().orgs().post(
-            new Organization( orgName, username, username + "@usergrid.com", username, password, null ) );
-
-        restClient.management().token().get(username,password);
-
-        clientCredentials = restClient.management().orgs().org( orgName ).credentials().get(Credentials.class);
-
-        ApiResponse appResponse = restClient.management().orgs()
-            .org( organization.getName() ).app().post(new Application(appName));
-        appUuid = ( String ) appResponse.getEntities().get( 0 ).get( "uuid" );
-        application = new Application( appResponse );
-        refreshIndex();
-
-        ApiResponse response = restClient.management().token().post(new Token(username, password));
-        refreshIndex();
-    }
-
-    public String getUsername(){return username;}
-
-    public String getEmail(){return username+"@usergrid.com";}
-
-    public String getPassword(){return password;}
-
-    public Organization getOrganization(){return organization;}
-
-    public String getOrganizationName(){return orgName;}
-
-    public String getAppName() {return appName;}
-
-    public String getAppUuid() {
-        return appUuid;
-    }
-
-    public Token getSuperuserToken() {
-        return superuserToken;
-    }
-
-    public String getSuperuserName() {
-        return superuserName;
-    }
-
-    public String getSuperuserPassword() {
-        return superuserPassword;
-    }
-
-    public Credentials getClientCredentials() {
-        return clientCredentials;
-    }
-
-    public void refreshIndex() {
-        this.restClient.refreshIndex(getOrganizationName(),getAppName(),
-            CpNamingUtils.getManagementApplicationId().getUuid().toString());
-
-        if(!CpNamingUtils.getManagementApplicationId().getUuid().toString().equals(getAppUuid())) {
-            this.restClient.refreshIndex(getOrganizationName(), getAppName(), getAppUuid());
-        }
-    }
-
-    public RestClient getRestClient(){
-        return restClient;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/DumbClient.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/DumbClient.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/DumbClient.java
deleted file mode 100644
index e56be2d..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/DumbClient.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.rest.test.resource2point0;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-import org.apache.usergrid.persistence.index.utils.UUIDUtils;
-
-
-
-/**
- * Test Class used to model if the client is working or doing what it is supposed to be doing.
- * ask if this is for test purposes and if so if I can mark it with junit
- */
-
-public class DumbClient extends AbstractRestIT {
-
-    @Test
-    public void stuff(){
-
-        String name = "stuff"+ UUIDUtils.newTimeUUID();
-       // User user = new User( "derp","derp", "derp"  );
-
-
-        //Organization org = clientSetup.getRestClient().management().orgs().post(  )
-      //  clientSetup.getRestClient().management().orgs().delete(org.getName);
-       // OrganizationResource response =  clientSetup.getRestClient().management().orgs().organization( "" );
-        //assertNotNull( response );
-        //EntityResponse itr  =  client.org( "test" ).getApp( "test" ).users().getEntityResponse();
-        //for(Entity entity: itr){
-    }
-
-
-    @Ignore
-    public void stateful(){
-
-//        EntityResponse itr  =  client.org( "test" ).getApp( "test" ).users().getEntityResponse();
-//
-//        for(Entity entity: itr){
-//
-//        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/README.md
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/README.md b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/README.md
deleted file mode 100644
index b82c6f7..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/README.md
+++ /dev/null
@@ -1,111 +0,0 @@
-#Rest Test Framework (RTF)
-
-##What is it?
-It is a java framework that helps abstract some of the difficulty in working with the rest tier. Each endpoint is a different part of the builder pattern that ends with a request at the end. This request is sent to an embedded tomcat that has a usergrid war deployed on it. When the response comes back the RTF parses the response and allows the user to query information returned.  
-
-##How does it work?
-It works by modeling the REST tier in Usergrid. We construct our query using usergrid endpoints that create our path and after it gets sent using POST/PUT/GET/DELETE.
-
-##Where is it
-All of the code is stored in resource2point0. The older resource folder holds the old rest testing framework. 
-
-##Requirements
-First you must have java 8 running on your machine. Then setup local instances of elasticsearch and cassandra on your box. 
-
-##How do I use it?
-
-###For example...
-
-It helps to start out with an example. Let's deconstruct the following line step by step
-
-	clientSetup.getRestClient().management().orgs().post( payload ); 
-	
-1. clientSetup
-	
-	1. The clientSetup is what stores the context of the rest call. It also creates a new superuser/org/app/user and stores information specific to each one in the clientsetup. If you don't want to create a new org or app then you are free to call the getters in the clientSetup for the context of the current rest calls.
-
-2. getRestClient()
-	
-	1. 	This returns our RestClient that handles the setup for our Jersey WebResource. In the RestClient class we handle the setup of the client and the configuration of the client.
-	
-	2. It also stores the top level rest properties that can be called. This client starts by appending the serverUrl to the resource path. 
-		
-		1. The serverUrl for our rest tests is the localhost:port. These are both automatically assigned.
-	
-	3. Next we have the option of calling any of the endpoint detailed in the RestClient.java. You'll see many options but the two most important are probably /management and /org which allow you to access a majority of usergrid endpoints. 
-
-3. management()
-	
-	1. This appends the "management" endpoint unto our path. Right now we have the following path "localhost:8080/management".
-	
-	2. In the ManagementResource class you will find other endpoints that you can call. In this example we're calling ```orgs()```.
-	
-4. orgs()
-	
-	1. This appends "/organizations" to the path, so now we have "localhost:8080/management/organizations"
-	
-	2. This sends us to OrganizationResource.java and will be the first instance where it will give you access to do a REST call. 
-	
-5. post( payload );
-
-	1. Here the organization class let's us know what endpoints we have available to us. In this case we want to post, but the individual classes will let you know what next steps are available.
-	2. So now we have a POST command against the locally embedded tomcat at the following endpoint "localhost:8080/management/organizations" and it will post the payload.
-	3. The payload is often a map object but specific types and return types will be covered later in the README.
-	
-###ClientSetup
-####What does it do?
-It setups and stores a new organization/owner/application/superuser for each test. Since this happens at the beginning of each test we can call the ClientSetup class for information when we don't want/need to create our own organization/owner/application/superuser. 
-
-####For Example...
-	String org = this.clientSetup.getOrganizationName();
-	String app = this.clientSetup.getAppName();
-	
-    clientSetup.getRestClient().org(org).app(app).collection("cities").get();
-    
-The above example is a call you could make in a rest test as soon as you start writing one. You don't have to create the org and application and you can just reference the ones already created for you.
-
-###RestClient
-####What does it do?
-Handles the setup for our Jersey WebResource. In the RestClient class we handle the configuration of the JerseyClient so we can send our rest calls against the tomcat. The rest client also contains the methods to call all of our top level classes. So from the RestClient we can call any of our top level endpoints. 
-
-
-###AbstractRestIT
-
-####What does it do?
-This class handles a lot of the setup required by the testing functionality. It also stores helper methods central to each test and setup the tomcat that the tests will be querying. That is why it is extended by every test class.
-
-####What helper methods does it give me access to?
-Every single one of the test queries makes a call from the context ( because it needs access to the unique org and application ) to get the client. There are methods to make the tests look cleaner by automating the calls and getting the endpoint you want without writing 
-
-	clientSetup.getRestClient()
-	
-###Endpoints
-####What does it do?
-Holds the classes that contain the builder pattern. There are a lot of classes here currently so its easy to get lost. Following the RestClient through the hierarchy of the calls you want to run will give you the greatest insight into how they are organized. 
-
-
-###Model
-This folder handles the data that gets returned from the api and the payloads that go into the api. 
-
-####For Example...
-
-To create an organization we can create a model object for the specific kind of entity we want to post.
-
-	Organization payload = new Organization( String orgName, String username, String email, String ownerName, String password, Map<String,Object> properties );
-
-Now that we have an organization payload, we can POST to create the organization.
-	
-	Organization org = clientSetup.getRestClient().management().orgs().post( payload ); 
-
-This in turn creates an Organization object we've called ```org``` that is intialized with the POST response. This gives us easy access to the organization information to verify that it was indeed created correctly.
-
-
-For a more in-depth explanation for how they work look at the readme in the model folder (Work-In-Progress).
-
-
-
-<!-- The below needs to be refactored into a different readme just for the model class.  
-
-####How does the RET model responses?
-We model responses by serializing the response into its respective model class. At the lowest level we use a ApiResponse. The ApiResponse contains fields for every kind of response we could recieve from the api. If there is any doubt about what class you need to return or push the response in you should use the ApiResponse. From the ApiResponse we model -->
-	  	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
deleted file mode 100644
index cc24ebe..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/RestClient.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.rest.test.resource2point0;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.WebResource;
-import com.sun.jersey.api.client.config.ClientConfig;
-import com.sun.jersey.api.client.config.DefaultClientConfig;
-import com.sun.jersey.api.client.filter.HTTPBasicAuthFilter;
-import org.apache.usergrid.rest.test.resource2point0.endpoints.*;
-import org.apache.usergrid.rest.test.resource2point0.endpoints.mgmt.ManagementResource;
-import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
-
-import javax.ws.rs.core.MediaType;
-
-
-/**
- * This REST client was made to be able to send calls to any backend system that accepts calls. To do this It needs to
- * work independently of the existing REST test framework.
- */
-public class RestClient implements UrlResource {
-
-    private final String serverUrl;
-    private ClientContext context;
-
-    public WebResource resource;
-    ClientConfig config = new DefaultClientConfig();
-    Client client = Client.create( config );
-
-    /**
-     *
-     * @param serverUrl
-     */
-    public RestClient( final String serverUrl ) {
-        this.serverUrl = serverUrl;
-        this.context = new ClientContext();
-        resource = client.resource( serverUrl );
-        resource.path( serverUrl );
-    }
-
-
-    /**
-     * TODO: should this method return the base path or the total path we have built?
-     */
-    @Override
-    public String getPath() {
-        return resource.getURI().toString();
-    }
-
-    @Override
-    public WebResource getResource() {
-        return client.resource( serverUrl );
-    }
-
-    public ClientContext getContext() {
-        return context;
-    }
-
-    public SystemResource system() {
-        return new SystemResource(context, this);
-    }
-
-    public TestPropertiesResource testPropertiesResource() {
-        return new TestPropertiesResource( context, this );
-    }
-    /**
-     * Get the management resource
-     */
-    public ManagementResource management() {
-        return new ManagementResource( context, this );
-    }
-
-
-    /**
-     * Get hte organization resource
-     */
-    public OrganizationResource org( final String orgName ) {
-        return new OrganizationResource( orgName, context, this );
-    }
-
-    public TokenResource token(){
-        return new TokenResource(context,this);
-    }
-    public void refreshIndex(String orgname, String appName, String appid) {
-        //TODO: add error checking and logging
-        this.getResource().path( "/refreshindex" )
-                .queryParam( "org_name", orgname )
-                .queryParam( "app_name",appName )
-                .queryParam("app_id", appid)
-            .accept( MediaType.APPLICATION_JSON ).post();
-    }
-
-    public NamedResource pathResource(String path){
-        return new NamedResource(path,context,this);
-    }
-
-    public void superuserSetup() {
-        //TODO: change this when we upgrade to new version of jersey
-        HTTPBasicAuthFilter httpBasicAuthFilter = new HTTPBasicAuthFilter( "superuser","superpassword" );
-        client.addFilter( httpBasicAuthFilter );
-
-        this.getResource().path( "system/superuser/setup" )
-            .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON ).get( JsonNode.class );
-        client.removeFilter( httpBasicAuthFilter );
-    }
-
-    //todo:fix this method for the client.
-//    public void loginAdminUser( final String username, final String password ) {
-//        //Post isn't implemented yet, but using the method below we should be able to get a superuser password as well.
-//        //final String token = management().token().post(username, password);
-//
-//        //context.setToken( token );
-//    }
-
-//
-//    public void createOrgandOwner
-
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/TestPropertiesResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/TestPropertiesResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/TestPropertiesResource.java
deleted file mode 100644
index 2650c29..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/TestPropertiesResource.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.rest.test.resource2point0;
-
-
-import javax.ws.rs.core.MediaType;
-
-import org.apache.usergrid.rest.test.resource2point0.endpoints.NamedResource;
-import org.apache.usergrid.rest.test.resource2point0.endpoints.UrlResource;
-import org.apache.usergrid.rest.test.resource2point0.model.ApiResponse;
-import org.apache.usergrid.rest.test.resource2point0.model.Entity;
-import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
-
-
-/**
- *Adds support for changing the management properties in the rest testing framework.
- */
-public class TestPropertiesResource extends NamedResource {
-    public TestPropertiesResource( final ClientContext context, final UrlResource parent ) {
-        super( "testproperties", context, parent );
-    }
-
-    public ApiResponse post(Entity testProperties){
-
-        return getResource(true).type( MediaType.APPLICATION_JSON_TYPE )
-                            .accept( MediaType.APPLICATION_JSON ).post( ApiResponse.class, testProperties );
-    }
-
-    public ApiResponse get(){
-        return getResource(true).type( MediaType.APPLICATION_JSON_TYPE )
-                       .accept( MediaType.APPLICATION_JSON ).get(ApiResponse.class );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/ApplicationsResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/ApplicationsResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/ApplicationsResource.java
deleted file mode 100644
index 1d84dea..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/ApplicationsResource.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.rest.test.resource2point0.endpoints;
-
-
-import org.apache.usergrid.rest.test.resource.app.Collection;
-import org.apache.usergrid.rest.test.resource2point0.endpoints.mgmt.CredentialsResource;
-import org.apache.usergrid.rest.test.resource2point0.model.ApiResponse;
-import org.apache.usergrid.rest.test.resource2point0.model.Application;
-import org.apache.usergrid.rest.test.resource2point0.model.Entity;
-import org.apache.usergrid.rest.test.resource2point0.model.Token;
-import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
-
-import javax.ws.rs.core.MediaType;
-
-
-/**
- * Holds the information required for building and chaining application objects to collections.
- * app("applications").post();
- */
-public class ApplicationsResource extends NamedResource {
-
-
-    public ApplicationsResource( final String name, final ClientContext context, final UrlResource parent ) {
-        super( name, context, parent );
-    }
-
-
-    public CollectionEndpoint collection(String name) {
-        return new CollectionEndpoint(name,context,this);
-    }
-
-
-    public TokenResource token() {
-        return new TokenResource( context, this );
-    }
-
-
-    /**
-     * Delete this application.
-     */
-    public ApiResponse delete() {
-        return getResource(true)
-            .type( MediaType.APPLICATION_JSON_TYPE )
-            .accept( MediaType.APPLICATION_JSON )
-            .delete( ApiResponse.class );
-    }
-
-    public CredentialsResource credentials(){
-        return new CredentialsResource(  context ,this );
-    }
-
-
-    /**
-     * Used to get an application entity.
-     */
-    public ApiResponse get() {
-        return getResource(true)
-            .type(MediaType.APPLICATION_JSON_TYPE)
-            .accept( MediaType.APPLICATION_JSON )
-            .get(ApiResponse.class);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/CollectionEndpoint.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/CollectionEndpoint.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/CollectionEndpoint.java
deleted file mode 100644
index d104e29..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/CollectionEndpoint.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.rest.test.resource2point0.endpoints;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.sun.jersey.api.client.WebResource;
-import org.apache.usergrid.rest.test.resource.CollectionResource;
-import org.apache.usergrid.rest.test.resource.EntityResource;
-import org.apache.usergrid.rest.test.resource2point0.model.*;
-import org.apache.usergrid.rest.test.resource2point0.model.Collection;
-import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
-import org.apache.usergrid.services.ServiceParameter;
-import org.apache.usergrid.utils.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import javax.ws.rs.core.MediaType;
-import java.io.IOException;
-import java.io.StringReader;
-import java.util.*;
-
-
-/**
- * //myorg/myapp/mycollection
- */
-public class CollectionEndpoint extends NamedResource {
-    private static final Logger logger = LoggerFactory.getLogger(CollectionEndpoint.class);
-
-    protected List<String> acceptHeaders = new ArrayList<String> ();
-    private String matrix;
-
-    public CollectionEndpoint(String name, ClientContext context, UrlResource parent) {
-        super(name, context, parent);
-    }
-
-    public EntityEndpoint uniqueID(final String identifier){
-        return new EntityEndpoint(identifier, context, this);
-    }
-
-    public EntityEndpoint entity(final Entity entity){
-        String identifier = (String) entity.get("uuid");
-        return entity(identifier);
-    }
-
-    public EntityEndpoint entity(final UUID identifier ){
-        return entity(identifier.toString());
-    }
-
-
-    public EntityEndpoint entity(final String identifier ){
-        return uniqueID(identifier);
-    }
-
-    public CollectionEndpoint withAcceptHeader(final String acceptHeader) {
-        this.acceptHeaders.add(acceptHeader);
-        return this;
-    }
-
-    /**
-     * <pre>
-     * app.collection("users").uniqueID("fred").connection("following").collection("users").uniqueID("barney").post();
-     * POST /users/fred/following/users/barney?token=<token>
-     *
-     * app.collection("users").uniqueID("fred").connection().collection("users").uniqueID("barney").post();
-     * POST /users/fred/groups/theitcrowd?token=<token>
-     * </pre>
-     */
-    public CollectionEndpoint collection(final String identifier){
-        return new CollectionEndpoint(identifier, context, this);
-    }
-
-
-
-    /**
-     * Get a list of entities.
-     *
-     * <pre>
-     * //with token
-     * app.collection("users").get(); //return entity
-     * GET /users?token=<token>
-     *
-     * //with query and token
-     * collection = app.collection("users").get(queryparam); //return collection (list of entities)
-     * GET /users?ql=select * where created > 0&token=<token>
-     *
-     * //with query and no token
-     * collection = app.collection("users").get(queryparam, false); //return collection (list of entities)
-     * GET /users?ql=select * where created > 0
-     *
-     * //with no query and no token
-     * collection = app.collection("users").get(null, false); //return collection (list of entities)
-     * GET /users
-     *
-     * collection = app.collection("users").get(collection);
-     * <pre>
-     */
-    public Collection get(){
-        return new Collection( get(ApiResponse.class,null,true));
-    }
-
-    public Collection get( final QueryParameters parameters ){
-        return get(parameters, true);
-    }
-
-    public Collection get(final QueryParameters parameters, final boolean useToken){
-
-        String acceptHeader = MediaType.APPLICATION_JSON;
-        if (this.acceptHeaders.size() > 0) {
-           acceptHeader = StringUtils.join(this.acceptHeaders, ',');
-        }
-
-        WebResource resource  = getResource(useToken);
-        resource = addParametersToResource(resource, parameters);
-
-        // use string type so we can log actual response from server
-        String responseString = resource.type( MediaType.APPLICATION_JSON_TYPE )
-            .accept(acceptHeader)
-            .get(String.class);
-
-        logger.debug("Response from get: " + responseString);
-
-        ObjectMapper mapper = new ObjectMapper();
-        ApiResponse response;
-        try {
-            response = mapper.readValue( new StringReader(responseString), ApiResponse.class);
-        } catch (IOException e) {
-            throw new RuntimeException("Error parsing response", e);
-        }
-
-        return new Collection(response);
-    }
-
-    /**
-     * Gets the next page using only default settings with the passed in collection.
-     *
-     * <pre>
-     * Collection usersCollection =  app.collection("users").get();
-     * //iterate through the collection
-     * while(usersCollection.hasNext()){
-     *  Entity bob = usersCollection.next();
-     *     assert("blah",bob.get("words"));
-     * }
-     * usersCollection = app.collections("users").getNextPage(usersCollection.cursor);
-     * </pre>
-     */
-    //TODO: add queryParameters here
-    public Collection getNextPage(Collection collection, QueryParameters passedParameters ,final boolean useToken) {
-        String acceptHeader = MediaType.APPLICATION_JSON;
-        if (this.acceptHeaders.size() > 0) {
-            acceptHeader = StringUtils.join(this.acceptHeaders, ',');
-        }
-
-        WebResource resource = getResource(useToken);
-        QueryParameters queryParameters = passedParameters;
-        if( queryParameters == null){
-            queryParameters = new QueryParameters();
-        }
-
-        queryParameters.setCursor(collection.getCursor());
-        resource = addParametersToResource(resource, queryParameters);
-
-        ApiResponse response = resource.type( MediaType.APPLICATION_JSON_TYPE ).accept(acceptHeader)
-                .get(ApiResponse.class);
-
-        return new Collection(response);
-    }
-
-    /**
-     * DELETE on a collection endpoint with query (use DELETE on entity for single entity delete).
-     *
-     * <pre>
-     * //with token
-     * app.collection("users").delete(parameters);
-     * DELETE /users?ql=select * where created > 0&token=<token>
-     *
-     * //without token
-     * app.collection("users").delete(parameters, false);
-     * DELETE /users?ql=select * where created > 0
-     *
-     * app.collection("users").delete(null, false);
-     * DELETE /users
-     * </pre>
-     */
-    public ApiResponse delete( final QueryParameters parameters ){
-        return delete(parameters, true);
-    }
-
-    public ApiResponse delete(final QueryParameters parameters, final boolean useToken) {
-
-        String acceptHeader = MediaType.APPLICATION_JSON;
-
-        if (this.acceptHeaders.size() > 0) {
-            acceptHeader = StringUtils.join(this.acceptHeaders, ',');
-        }
-
-        WebResource resource  = getResource(useToken);
-        resource = addParametersToResource(resource, parameters);
-        return resource.type( MediaType.APPLICATION_JSON_TYPE )
-            .accept(acceptHeader)
-            .delete(ApiResponse.class);
-    }
-
-    /**
-     * Post an entity to a collection.
-     *
-     * <pre>
-     * app.collection("users").post(entity);
-     * POST /users {"color","red"}
-     * </pre>
-     */
-    public Entity post(Entity payload){
-
-        String acceptHeader = MediaType.APPLICATION_JSON;
-        if (this.acceptHeaders.size() > 0) {
-            acceptHeader = StringUtils.join(this.acceptHeaders, ',');
-        }
-
-        // use string type so we can log actual response from server
-        String responseString = getResource(true)
-            .type( MediaType.APPLICATION_JSON_TYPE )
-            .accept(acceptHeader)
-            .post(String.class, payload);
-
-        logger.debug("Response from post: " + responseString);
-
-        ObjectMapper mapper = new ObjectMapper();
-        ApiResponse response;
-        try {
-            response = mapper.readValue( new StringReader(responseString), ApiResponse.class);
-        } catch (IOException e) {
-            throw new RuntimeException("Error parsing response", e);
-        }
-
-        return new Entity(response);
-    }
-
-    public Entity post() {
-
-        String acceptHeader = MediaType.APPLICATION_JSON;
-
-        if (this.acceptHeaders.size() > 0) {
-            acceptHeader = StringUtils.join(this.acceptHeaders, ',');
-        }
-
-        // use string type so we can log actual response from server
-        String responseString = getResource(true)
-            .type( MediaType.APPLICATION_JSON_TYPE )
-            .accept(acceptHeader)
-            .post(String.class);
-
-        logger.debug("Response from post: " + responseString);
-
-        ObjectMapper mapper = new ObjectMapper();
-        ApiResponse response;
-        try {
-            response = mapper.readValue( new StringReader(responseString), ApiResponse.class);
-        } catch (IOException e) {
-            throw new RuntimeException("Error parsing response", e);
-        }
-
-        return new Entity(response);
-    }
-
-    public ApiResponse post(List<Entity> entityList) {
-
-        String acceptHeader = MediaType.APPLICATION_JSON;
-
-        if (this.acceptHeaders.size() > 0) {
-            acceptHeader = StringUtils.join(this.acceptHeaders, ',');
-        }
-
-        // use string type so we can log actual response from server
-        String responseString = getResource(true)
-            .type( MediaType.APPLICATION_JSON_TYPE )
-            .accept(acceptHeader)
-            .post(String.class, entityList );
-
-        logger.debug("Response from post: " + responseString);
-
-        ObjectMapper mapper = new ObjectMapper();
-        ApiResponse response;
-        try {
-            response = mapper.readValue( new StringReader(responseString), ApiResponse.class);
-        } catch (IOException e) {
-            throw new RuntimeException("Error parsing response", e);
-        }
-
-        return response;
-    }
-
-    /**
-     * PUT a payload to a collection.
-     *
-     * <pre>
-     * app.collection("users").put(entity, param);
-     * PUT /users?ql=select * where created > 0&token=<token>
-     *
-     * app.collection("users").put(entity, false, param);
-     * PUT /users?ql=select * where created > 0
-     * </pre>
-     */
-    public ApiResponse put( final QueryParameters parameters, Entity entity ){
-        return put(parameters, true, entity);
-    }
-
-    public ApiResponse put(final QueryParameters parameters, final boolean useToken, Entity entity) {
-
-        String acceptHeader = MediaType.APPLICATION_JSON;
-        if (this.acceptHeaders.size() > 0) {
-            acceptHeader = StringUtils.join(this.acceptHeaders, ',');
-        }
-
-        WebResource resource  = getResource(useToken);
-        addParametersToResource(getResource(), parameters);
-
-        // use string type so we can log actual response from server
-        String responseString = resource.type(MediaType.APPLICATION_JSON_TYPE)
-            .accept(acceptHeader)
-            .post(String.class, entity);
-
-        logger.debug("Response from put: " + responseString);
-
-        ObjectMapper mapper = new ObjectMapper();
-        ApiResponse response;
-        try {
-            response = mapper.readValue( new StringReader(responseString), ApiResponse.class);
-        } catch (IOException e) {
-            throw new RuntimeException("Error parsing response", e);
-        }
-
-        return response;
-    }
-
-    public CollectionEndpoint matrix(QueryParameters parameters) {
-        this.matrix = getMatrixValue(parameters);
-        return this;
-    }
-
-    @Override
-    public String getMatrix(){
-        return matrix != null ? matrix : "";
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/DatabaseResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/DatabaseResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/DatabaseResource.java
deleted file mode 100644
index 7ed31ac..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/DatabaseResource.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.usergrid.rest.test.resource2point0.endpoints;
-
-
-import javax.ws.rs.core.MediaType;
-
-import org.apache.usergrid.persistence.cassandra.Setup;
-import org.apache.usergrid.rest.test.resource2point0.model.Entity;
-import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
-
-
-/**
- * Contains methods pertaining to system/database/*
- */
-public class DatabaseResource extends NamedResource {
-
-    public DatabaseResource( final ClientContext context, final UrlResource parent ) {
-        super( "database", context, parent );
-    }
-
-    public SetupResource setup(){
-        return new SetupResource (context, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/876dc8d3/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/EntityEndpoint.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/EntityEndpoint.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/EntityEndpoint.java
deleted file mode 100644
index 25965ac..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/EntityEndpoint.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- *
- *  * Licensed to the Apache Software Foundation (ASF) under one or more
- *  *  contributor license agreements.  The ASF licenses this file to You
- *  * under the Apache License, Version 2.0 (the "License"); you may not
- *  * use this file except in compliance with the License.
- *  * You may obtain a copy of the License at
- *  *
- *  *     http://www.apache.org/licenses/LICENSE-2.0
- *  *
- *  * Unless required by applicable law or agreed to in writing, software
- *  * distributed under the License is distributed on an "AS IS" BASIS,
- *  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  * See the License for the specific language governing permissions and
- *  * limitations under the License.  For additional information regarding
- *  * copyright in this work, please see the NOTICE file in the top level
- *  * directory of this distribution.
- *
- */
-
-package org.apache.usergrid.rest.test.resource2point0.endpoints;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.sun.jersey.api.client.WebResource;
-import org.apache.usergrid.rest.test.resource2point0.model.ApiResponse;
-import org.apache.usergrid.rest.test.resource2point0.model.Entity;
-import org.apache.usergrid.rest.test.resource2point0.model.QueryParameters;
-import org.apache.usergrid.rest.test.resource2point0.model.Token;
-import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
-
-import javax.ws.rs.core.MediaType;
-
-public class EntityEndpoint extends NamedResource {
-
-    public EntityEndpoint(String identifier, ClientContext context, UrlResource parent) {
-        super(identifier, context, parent);
-    }
-
-
-    /**
-     *
-     * GET a single entity
-     *
-     * @return Entity
-     *
-     *
-     * entity = app.collection("users").uniqueID("fred").get(); //return one entity
-     * GET /users/fred
-     *
-     * entity = app.collection("users").entity(entity).get(); //return one entity
-     * GET /users/username_in_entity_obj
-     *
-     */
-    public Entity get(){
-        return get(true);
-    }
-
-    public Entity get(final boolean useToken){
-        return get(useToken,null);
-    }
-    public Entity get(final Token token){
-        return get(true,token);
-    }
-
-    public Entity get(final boolean useToken, final Token token){
-        WebResource resource  = getResource(useToken,token);
-        ApiResponse response = resource.type( MediaType.APPLICATION_JSON_TYPE ).accept(MediaType.APPLICATION_JSON)
-                .get(ApiResponse.class);
-
-        return new Entity(response);
-    }
-
-    //For testing purposes only
-    public Entity get(QueryParameters parameters, final boolean useToken){
-        WebResource resource  = getResource(useToken);
-        resource = addParametersToResource(resource, parameters);
-        ApiResponse response = resource.type( MediaType.APPLICATION_JSON_TYPE ).accept(MediaType.APPLICATION_JSON)
-                                       .get(ApiResponse.class);
-
-        return new Entity(response);
-    }
-
-
-    /**
-     * DELETE a single entity
-     *
-     *
-     * app.collection("users").entity(entity).delete();
-     * DELETE /users/username?token=<token>
-     *
-     * app.collection("users").entity(entity).delete(false);
-     * DELETE /users/uuid
-     */
-    public ApiResponse delete(){
-        return delete(true);
-    }
-
-    public ApiResponse delete(final boolean useToken){
-        WebResource resource  = getResource(useToken);
-        return resource.type( MediaType.APPLICATION_JSON_TYPE ).accept(MediaType.APPLICATION_JSON)
-                .delete(ApiResponse.class);
-    }
-
-    /**
-     * Put the entity to the collection
-     * @param entity
-     * @return
-     *
-     * app.collection("users").entity(entity).put(entity);
-     * PUT /users/uuid {}
-     *
-     * app.collection("users").uniqueID("fred").put(entity);
-     * PUT /users/fred {"color":"red"}
-     */
-    public Entity put(Entity entity){
-        ApiResponse response = getResource(true).type( MediaType.APPLICATION_JSON_TYPE ).accept(MediaType.APPLICATION_JSON)
-                .put(ApiResponse.class, entity);
-        return new Entity(response);
-    }
-
-
-    /**
-     * POST with no payload
-     *
-     * app.collection("users").uniqueID("fred").connection("following").collection("users").uniqueID("barney").post();
-     * POST /users/fred/following/users/barney?token=<token>
-     *
-     * app.collection("users").uniqueID("fred").connection("following").collection("users").uniqueID("barney").post(false);
-     * POST /users/fred/following/users/barney
-     *
-     */
-    public Entity post(){
-        return post(true);
-    }
-
-    public Entity post(final boolean useToken){
-        WebResource resource  = getResource(useToken);
-        ApiResponse response = resource.type(MediaType.APPLICATION_JSON_TYPE ).accept(MediaType.APPLICATION_JSON)
-                .post(ApiResponse.class);
-
-        return new Entity(response);
-    }
-
-    /**
-     *
-     * app.collection("users").uniqueID("fred").connection("following).get();
-     * GET /users/fred/following
-     *
-     * app.collection("users").uniqueID("fred").connection("following").collection("users").uniqueID("barney").post();
-     * POST /users/fred/following/users/barney?token=<token>
-     *
-     * app.collection("users").uniqueID("fred").connection().collection("users").uniqueID("barney").post();
-     * POST /users/fred/following/users/barney?token=<token>
-     *
-     */
-    public CollectionEndpoint connection(final String connection,final String collection) {
-        return new CollectionEndpoint(connection+"/"+collection, context, this);
-    }
-    public CollectionEndpoint connection(final String connection) {
-        return new CollectionEndpoint(connection, context, this);
-
-    }
-    public CollectionEndpoint collection(final String identifier) {
-        return new CollectionEndpoint(identifier, context, this);
-    }
-    public CollectionEndpoint connection(){
-        return new CollectionEndpoint("", context, this);
-    }
-
-
-    public CollectionEndpoint activities() {
-        return collection("activities");
-    }
-}