usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [4/8] git commit: Formatting only.
Date Fri, 17 Oct 2014 19:12:45 GMT
Formatting only.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/2c5e6f59
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/2c5e6f59
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/2c5e6f59

Branch: refs/heads/two-dot-o
Commit: 2c5e6f590e39534e810d28f0440df7c656faabb2
Parents: c6e0cd0
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Tue Oct 14 10:41:21 2014 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Tue Oct 14 10:41:21 2014 -0400

----------------------------------------------------------------------
 .../usergrid/rest/management/AccessTokenIT.java | 381 ++++++++++---------
 1 file changed, 207 insertions(+), 174 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c5e6f59/stack/rest/src/test/java/org/apache/usergrid/rest/management/AccessTokenIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AccessTokenIT.java
b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AccessTokenIT.java
index bad46a7..65900c4 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AccessTokenIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AccessTokenIT.java
@@ -14,34 +14,22 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.usergrid.rest.management;
 
-
+import com.fasterxml.jackson.databind.JsonNode;
+import com.sun.jersey.api.client.ClientResponse;
+import com.sun.jersey.api.client.UniformInterfaceException;
+import com.sun.jersey.api.representation.Form;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
-
 import javax.ws.rs.core.MediaType;
-
-import org.junit.Test;
-
 import org.apache.usergrid.rest.AbstractRestIT;
 import org.apache.usergrid.rest.management.organizations.OrganizationsResource;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.UniformInterfaceException;
-import com.sun.jersey.api.representation.Form;
-
 import static org.apache.usergrid.utils.MapUtils.hashMap;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-
-
-/**
- * Created by ApigeeCorporation on 9/17/14.
- */
+import org.junit.Test;
 
 
 /**
@@ -49,7 +37,7 @@ import static org.junit.Assert.assertNotNull;
  */
 public class AccessTokenIT extends AbstractRestIT {
 
-    public AccessTokenIT() throws Exception{
+    public AccessTokenIT() throws Exception {
 
     }
 
@@ -58,293 +46,338 @@ public class AccessTokenIT extends AbstractRestIT {
 
         long ttl = 2000;
 
-        JsonNode node = mapper.readTree( 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( String.class ));
+        JsonNode node = mapper.readTree(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(String.class));
 
         long startTime = System.currentTimeMillis();
 
-        String token = node.get( "access_token" ).textValue();
+        String token = node.get("access_token").textValue();
 
-        assertNotNull( token );
+        assertNotNull(token);
 
-        JsonNode userdata = mapper.readTree( resource().path( "/management/users/test@usergrid.com"
).queryParam( "access_token", token )
-                                                       .accept( MediaType.APPLICATION_JSON
).get( String.class ));
+        JsonNode userdata = mapper.readTree(resource()
+                .path("/management/users/test@usergrid.com")
+                .queryParam("access_token", token)
+                .accept(MediaType.APPLICATION_JSON)
+                .get(String.class));
 
-        assertEquals( "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 );
+        Thread.sleep(ttl - (System.currentTimeMillis() - startTime) + 1000);
 
         ClientResponse.Status responseStatus = null;
         try {
-            userdata = mapper.readTree( resource().path( "/management/users/test@usergrid.com"
).accept( MediaType.APPLICATION_JSON )
-                                                  .type( MediaType.APPLICATION_JSON_TYPE
).get( String.class ));
-        }
-        catch ( UniformInterfaceException uie ) {
+            userdata = mapper.readTree(resource()
+                    .path("/management/users/test@usergrid.com")
+                    .accept(MediaType.APPLICATION_JSON)
+                    .type(MediaType.APPLICATION_JSON_TYPE)
+                    .get(String.class));
+        } catch (UniformInterfaceException uie) {
             responseStatus = uie.getResponse().getClientResponseStatus();
         }
 
-        assertEquals( ClientResponse.Status.UNAUTHORIZED, responseStatus );
+        assertEquals(ClientResponse.Status.UNAUTHORIZED, responseStatus);
     }
 
-
     @Test
     public void token() throws Exception {
-        JsonNode node = mapper.readTree( resource().path( "/management/token" ).queryParam(
"grant_type", "password" )
-                                                   .queryParam( "username", "test@usergrid.com"
).queryParam( "password", "test" )
-                                                   .accept( MediaType.APPLICATION_JSON ).get(
String.class ));
-
-        logNode( node );
-        String token = node.get( "access_token" ).textValue();
-        assertNotNull( token );
+        JsonNode node = mapper.readTree(resource()
+                .path("/management/token")
+                .queryParam("grant_type", "password")
+                .queryParam("username", "test@usergrid.com")
+                .queryParam("password", "test")
+                .accept(MediaType.APPLICATION_JSON)
+                .get(String.class));
+
+        logNode(node);
+        String token = node.get("access_token").textValue();
+        assertNotNull(token);
 
         // set an organization property
         HashMap<String, Object> payload = new HashMap<String, Object>();
         Map<String, Object> properties = new HashMap<String, Object>();
-        properties.put( "securityLevel", 5 );
-        payload.put( OrganizationsResource.ORGANIZATION_PROPERTIES, properties );
-        node = mapper.readTree( resource().path( "/management/organizations/test-organization"
)
-                                          .queryParam( "access_token", superAdminToken()
).accept( MediaType.APPLICATION_JSON )
-                                          .type( MediaType.APPLICATION_JSON_TYPE ).put( String.class,
payload ));
+        properties.put("securityLevel", 5);
+        payload.put(OrganizationsResource.ORGANIZATION_PROPERTIES, properties);
+        node = mapper.readTree(resource()
+                .path("/management/organizations/test-organization")
+                .queryParam("access_token", superAdminToken())
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_JSON_TYPE)
+                .put(String.class, payload));
 
         refreshIndex("test-organization", "test-app");
 
         // ensure the organization property is included
-        node = mapper.readTree( resource().path( "/management/token" ).queryParam( "access_token",
token )
-                                          .accept( MediaType.APPLICATION_JSON ).get( String.class
));
-        logNode( node );
+        node = mapper.readTree(resource().path("/management/token").queryParam("access_token",
token)
+                .accept(MediaType.APPLICATION_JSON).get(String.class));
+        logNode(node);
 
-        JsonNode securityLevel = node.findValue( "securityLevel" );
-        assertNotNull( securityLevel );
-        assertEquals( 5L, securityLevel.asLong() );
+        JsonNode securityLevel = node.findValue("securityLevel");
+        assertNotNull(securityLevel);
+        assertEquals(5L, securityLevel.asLong());
     }
 
-
     @Test
     public void meToken() throws Exception {
-        JsonNode node = mapper.readTree( resource().path( "/management/me" ).queryParam(
"grant_type", "password" )
-                                                   .queryParam( "username", "test@usergrid.com"
).queryParam( "password", "test" )
-                                                   .accept( MediaType.APPLICATION_JSON ).get(
String.class ));
-
-        logNode( node );
-        String token = node.get( "access_token" ).textValue();
-        assertNotNull( token );
-
-        node = mapper.readTree( resource().path( "/management/me" ).queryParam( "access_token",
token )
-                                          .accept( MediaType.APPLICATION_JSON ).get( String.class
));
-        logNode( node );
-
-        assertNotNull( node.get( "passwordChanged" ) );
-        assertNotNull( node.get( "access_token" ) );
-        assertNotNull( node.get( "expires_in" ) );
-        JsonNode userNode = node.get( "user" );
-        assertNotNull( userNode );
-        assertNotNull( userNode.get( "uuid" ) );
-        assertNotNull( userNode.get( "username" ) );
-        assertNotNull( userNode.get( "email" ) );
-        assertNotNull( userNode.get( "name" ) );
-        assertNotNull( userNode.get( "properties" ) );
-        JsonNode orgsNode = userNode.get( "organizations" );
-        assertNotNull( orgsNode );
-        JsonNode orgNode = orgsNode.get( "test-organization" );
-        assertNotNull( orgNode );
-        assertNotNull( orgNode.get( "name" ) );
-        assertNotNull( orgNode.get( "properties" ) );
+        JsonNode node = mapper.readTree(resource()
+                .path("/management/me")
+                .queryParam("grant_type", "password")
+                .queryParam("username", "test@usergrid.com")
+                .queryParam("password", "test")
+                .accept(MediaType.APPLICATION_JSON)
+                .get(String.class));
+
+        logNode(node);
+        String token = node.get("access_token").textValue();
+        assertNotNull(token);
+
+        node = mapper.readTree(resource()
+                .path("/management/me")
+                .queryParam("access_token", token)
+                .accept(MediaType.APPLICATION_JSON)
+                .get(String.class));
+        logNode(node);
+
+        assertNotNull(node.get("passwordChanged"));
+        assertNotNull(node.get("access_token"));
+        assertNotNull(node.get("expires_in"));
+        JsonNode userNode = node.get("user");
+        assertNotNull(userNode);
+        assertNotNull(userNode.get("uuid"));
+        assertNotNull(userNode.get("username"));
+        assertNotNull(userNode.get("email"));
+        assertNotNull(userNode.get("name"));
+        assertNotNull(userNode.get("properties"));
+        JsonNode orgsNode = userNode.get("organizations");
+        assertNotNull(orgsNode);
+        JsonNode orgNode = orgsNode.get("test-organization");
+        assertNotNull(orgNode);
+        assertNotNull(orgNode.get("name"));
+        assertNotNull(orgNode.get("properties"));
     }
 
-
     @Test
     public void meTokenPost() throws Exception {
-        Map<String, String> payload =
-                hashMap( "grant_type", "password" ).map( "username", "test@usergrid.com"
).map( "password", "test" );
+        Map<String, String> payload
+                = hashMap("grant_type", "password")
+                .map("username", "test@usergrid.com").map("password", "test");
 
-        JsonNode node = mapper.readTree( resource().path( "/management/me" ).accept( MediaType.APPLICATION_JSON
)
-                                                   .type( MediaType.APPLICATION_JSON_TYPE
).post( String.class, payload ));
+        JsonNode node = mapper.readTree(resource()
+                .path("/management/me")
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_JSON_TYPE)
+                .post(String.class, payload));
 
-        logNode( node );
-        String token = node.get( "access_token" ).textValue();
+        logNode(node);
+        String token = node.get("access_token").textValue();
 
-        assertNotNull( token );
+        assertNotNull(token);
 
         refreshIndex("test-organization", "test-app");
 
-        node = mapper.readTree( resource().path( "/management/me" ).queryParam( "access_token",
token )
-                                          .accept( MediaType.APPLICATION_JSON ).get( String.class
));
-        logNode( node );
+        node = mapper.readTree(resource()
+                .path("/management/me")
+                .queryParam("access_token", token)
+                .accept(MediaType.APPLICATION_JSON)
+                .get(String.class));
+        logNode(node);
     }
 
-
     @Test
     public void meTokenPostForm() throws IOException {
 
         Form form = new Form();
-        form.add( "grant_type", "password" );
-        form.add( "username", "test@usergrid.com" );
-        form.add( "password", "test" );
+        form.add("grant_type", "password");
+        form.add("username", "test@usergrid.com");
+        form.add("password", "test");
 
-        JsonNode node = mapper.readTree( resource().path( "/management/me" ).accept( MediaType.APPLICATION_JSON
)
-                                                   .type( MediaType.APPLICATION_FORM_URLENCODED_TYPE
)
-                                                   .entity( form, MediaType.APPLICATION_FORM_URLENCODED_TYPE
).post( String.class ));
+        JsonNode node = mapper.readTree(resource()
+                .path("/management/me")
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_FORM_URLENCODED_TYPE)
+                .entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE)
+                .post(String.class));
 
-        logNode( node );
-        String token = node.get( "access_token" ).textValue();
+        logNode(node);
+        String token = node.get("access_token").textValue();
 
-        assertNotNull( token );
+        assertNotNull(token);
 
         refreshIndex("test-organization", "test-app");
 
-        node = mapper.readTree( resource().path( "/management/me" ).queryParam( "access_token",
token )
-                                          .accept( MediaType.APPLICATION_JSON ).get( String.class
));
-        logNode( node );
+        node = mapper.readTree(resource()
+                .path("/management/me")
+                .queryParam("access_token", token)
+                .accept(MediaType.APPLICATION_JSON).get(String.class));
+        logNode(node);
     }
 
-
     @Test
     public void ttlNan() throws Exception {
 
-        Map<String, String> payload =
-                hashMap( "grant_type", "password" ).map( "username", "test@usergrid.com"
).map( "password", "test" )
-                                                   .map( "ttl", "derp" );
+        Map<String, String> payload = hashMap("grant_type", "password")
+                .map("username", "test@usergrid.com")
+                .map("password", "test")
+                .map("ttl", "derp");
 
         ClientResponse.Status responseStatus = null;
         try {
-            resource().path( "/management/token" ).accept( MediaType.APPLICATION_JSON )
-                      .type( MediaType.APPLICATION_JSON_TYPE ).post( String.class, payload
);
-        }
-        catch ( UniformInterfaceException uie ) {
+            resource().path("/management/token")
+                    .accept(MediaType.APPLICATION_JSON)
+                    .type(MediaType.APPLICATION_JSON_TYPE)
+                    .post(String.class, payload);
+        } catch (UniformInterfaceException uie) {
             responseStatus = uie.getResponse().getClientResponseStatus();
         }
 
-        assertEquals( ClientResponse.Status.BAD_REQUEST, responseStatus );
+        assertEquals(ClientResponse.Status.BAD_REQUEST, responseStatus);
     }
 
-
     @Test
     public void ttlOverMax() throws Exception {
 
-        Map<String, String> payload =
-                hashMap( "grant_type", "password" ).map( "username", "test@usergrid.com"
).map( "password", "test" )
-                                                   .map( "ttl", Long.MAX_VALUE + "" );
+        Map<String, String> payload = hashMap("grant_type", "password")
+                .map("username", "test@usergrid.com")
+                .map("password", "test")
+                .map("ttl", Long.MAX_VALUE + "");
 
         ClientResponse.Status responseStatus = null;
 
         try {
-            resource().path( "/management/token" ).accept( MediaType.APPLICATION_JSON )
-                      .type( MediaType.APPLICATION_JSON_TYPE ).post( String.class, payload
);
-        }
-        catch ( UniformInterfaceException uie ) {
+            resource().path("/management/token")
+                    .accept(MediaType.APPLICATION_JSON)
+                    .type(MediaType.APPLICATION_JSON_TYPE)
+                    .post(String.class, payload);
+        } catch (UniformInterfaceException uie) {
             responseStatus = uie.getResponse().getClientResponseStatus();
         }
 
-        assertEquals( ClientResponse.Status.BAD_REQUEST, responseStatus );
+        assertEquals(ClientResponse.Status.BAD_REQUEST, responseStatus);
     }
 
-
     @Test
     public void revokeToken() throws Exception {
         String token1 = super.adminToken();
         String token2 = super.adminToken();
 
-        JsonNode response = mapper.readTree( resource().path( "/management/users/test" ).queryParam(
"access_token", token1 )
-                                                       .accept( MediaType.APPLICATION_JSON
).type( MediaType.APPLICATION_JSON_TYPE )
-                                                       .get( String.class ));
+        JsonNode response = mapper.readTree(resource().path("/management/users/test")
+                .queryParam("access_token", token1)
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_JSON_TYPE)
+                .get(String.class));
 
-        assertEquals( "test@usergrid.com", response.get( "data" ).get( "email" ).asText()
);
+        assertEquals("test@usergrid.com", response.get("data").get("email").asText());
 
-        response = mapper.readTree( resource().path( "/management/users/test" ).queryParam(
"access_token", token2 )
-                                              .accept( MediaType.APPLICATION_JSON ).type(
MediaType.APPLICATION_JSON_TYPE )
-                                              .get( String.class ));
+        response = mapper.readTree(resource().path("/management/users/test")
+                .queryParam("access_token", token2)
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_JSON_TYPE)
+                .get(String.class));
 
-        assertEquals( "test@usergrid.com", response.get( "data" ).get( "email" ).asText()
);
+        assertEquals("test@usergrid.com", response.get("data").get("email").asText());
 
         // now revoke the tokens
-        response = mapper.readTree( resource().path( "/management/users/test/revoketokens"
).queryParam( "access_token", superAdminToken() )
-                                              .accept( MediaType.APPLICATION_JSON ).type(
MediaType.APPLICATION_JSON_TYPE )
-                                              .post( String.class ));
+        response = mapper.readTree(resource().path("/management/users/test/revoketokens")
+                .queryParam("access_token", superAdminToken())
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_JSON_TYPE)
+                .post(String.class));
 
         refreshIndex("test-organization", "test-app");
 
         // the tokens shouldn't work
-
         ClientResponse.Status status = null;
 
         try {
-            response = mapper.readTree( resource().path( "/management/users/test" ).queryParam(
"access_token", token1 )
-                                                  .accept( MediaType.APPLICATION_JSON ).type(
MediaType.APPLICATION_JSON_TYPE )
-                                                  .get( String.class ));
-        }
-        catch ( UniformInterfaceException uie ) {
+            response = mapper.readTree(resource().path("/management/users/test")
+                    .queryParam("access_token", token1)
+                    .accept(MediaType.APPLICATION_JSON)
+                    .type(MediaType.APPLICATION_JSON_TYPE)
+                    .get(String.class));
+        } catch (UniformInterfaceException uie) {
             status = uie.getResponse().getClientResponseStatus();
         }
 
-        assertEquals( ClientResponse.Status.UNAUTHORIZED, status );
+        assertEquals(ClientResponse.Status.UNAUTHORIZED, status);
 
         status = null;
 
         try {
-            response = mapper.readTree( resource().path( "/management/users/test" ).queryParam(
"access_token", token2 )
-                                                  .accept( MediaType.APPLICATION_JSON ).type(
MediaType.APPLICATION_JSON_TYPE )
-                                                  .get( String.class ));
-        }
-        catch ( UniformInterfaceException uie ) {
+            response = mapper.readTree(resource().path("/management/users/test")
+                    .queryParam("access_token", token2)
+                    .accept(MediaType.APPLICATION_JSON)
+                    .type(MediaType.APPLICATION_JSON_TYPE)
+                    .get(String.class));
+        } catch (UniformInterfaceException uie) {
             status = uie.getResponse().getClientResponseStatus();
         }
 
-        assertEquals( ClientResponse.Status.UNAUTHORIZED, status );
+        assertEquals(ClientResponse.Status.UNAUTHORIZED, status);
 
         String token3 = super.adminToken();
         String token4 = super.adminToken();
 
-        response = mapper.readTree( resource().path( "/management/users/test" ).queryParam(
"access_token", token3 )
-                                              .accept( MediaType.APPLICATION_JSON ).type(
MediaType.APPLICATION_JSON_TYPE )
-                                              .get( String.class ));
+        response = mapper.readTree(resource().path("/management/users/test")
+                .queryParam("access_token", token3)
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_JSON_TYPE)
+                .get(String.class));
 
-        assertEquals( "test@usergrid.com", response.get( "data" ).get( "email" ).asText()
);
+        assertEquals("test@usergrid.com", response.get("data").get("email").asText());
 
-        response = mapper.readTree( resource().path( "/management/users/test" ).queryParam(
"access_token", token4 )
-                                              .accept( MediaType.APPLICATION_JSON ).type(
MediaType.APPLICATION_JSON_TYPE )
-                                              .get( String.class ));
+        response = mapper.readTree(resource().path("/management/users/test")
+                .queryParam("access_token", token4)
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_JSON_TYPE)
+                .get(String.class));
 
-        assertEquals( "test@usergrid.com", response.get( "data" ).get( "email" ).asText()
);
+        assertEquals("test@usergrid.com", response.get("data").get("email").asText());
 
         // now revoke the token3
-        response = mapper.readTree( resource().path( "/management/users/test/revoketoken"
).queryParam( "access_token", token3 )
-                                              .queryParam( "token", token3 ).accept( MediaType.APPLICATION_JSON
)
-                                              .type( MediaType.APPLICATION_JSON_TYPE ).post(
String.class ));
+        response = mapper.readTree(resource().path("/management/users/test/revoketoken")
+                .queryParam("access_token", token3)
+                .queryParam("token", token3)
+                .accept(MediaType.APPLICATION_JSON)
+                .type(MediaType.APPLICATION_JSON_TYPE)
+                .post(String.class));
 
         // the token3 shouldn't work
-
         status = null;
 
         try {
-            response = mapper.readTree( resource().path( "/management/users/test" ).queryParam(
"access_token", token3 )
-                                                  .accept( MediaType.APPLICATION_JSON ).type(
MediaType.APPLICATION_JSON_TYPE )
-                                                  .get( String.class ));
-        }
-        catch ( UniformInterfaceException uie ) {
+            response = mapper.readTree(resource().path("/management/users/test")
+                    .queryParam("access_token", token3)
+                    .accept(MediaType.APPLICATION_JSON)
+                    .type(MediaType.APPLICATION_JSON_TYPE)
+                    .get(String.class));
+        } catch (UniformInterfaceException uie) {
             status = uie.getResponse().getClientResponseStatus();
         }
 
-        assertEquals( ClientResponse.Status.UNAUTHORIZED, status );
+        assertEquals(ClientResponse.Status.UNAUTHORIZED, status);
 
         status = null;
 
         try {
-            response = mapper.readTree( resource().path( "/management/users/test" ).queryParam(
"access_token", token4 )
-                                                  .accept( MediaType.APPLICATION_JSON ).type(
MediaType.APPLICATION_JSON_TYPE )
-                                                  .get( String.class ));
+            response = mapper.readTree(resource().path("/management/users/test")
+                    .queryParam("access_token", token4)
+                    .accept(MediaType.APPLICATION_JSON)
+                    .type(MediaType.APPLICATION_JSON_TYPE)
+                    .get(String.class));
 
             status = ClientResponse.Status.OK;
-        }
-        catch ( UniformInterfaceException uie ) {
+        } catch (UniformInterfaceException uie) {
             status = uie.getResponse().getClientResponseStatus();
         }
 
-        assertEquals( ClientResponse.Status.OK, status );
+        assertEquals(ClientResponse.Status.OK, status);
     }
 
-
-
 }


Mime
View raw message