agave-files/files-api/src/test/java/org/iplantc/service/io/resources/FileListingResourcelIT.java
/**
	 * Parses standard response stanza for the actual body and code
	 *
	 * @param representation the response from the service
	 * @param shouldSucceed  true if the service should succed, false, otherwise
	 * @return the json object in the "result" field of the response.
	 * @throws IOException if the response could not be read.
	 */
Parses standard response stanza for the actual body and code
@param representation the response from the service
@param shouldSucceed  true if the service should succed, false, otherwise
@return the json object in the "result" field of the response.
@throws IOException if the response could not be read.
Parses standard response stanza for the actual body and code @param representation the response from the service @param shouldSucceed true if the service should succed false otherwise @return the json object in the " result " field of the response . @throws IOException if the response could not be read .
private JsonNode verifyResponse(Representation representation, boolean shouldSucceed) throws IOException {
		String responseBody = representation.getText();
		Assert.assertNotNull(responseBody, "Null body returned");
		ObjectMapper mapper = new ObjectMapper();
		JsonNode json = mapper.readTree(responseBody);
		if (shouldSucceed) {
			Assert.assertEquals(json.get("status").asText().toLowerCase(), "success", "Error when success should have occurred");
		} else {
			Assert.assertEquals(json.get("status").asText().toLowerCase(), "error", "Success when error should have occurred");
		}
		return json.get("result");
	}
private JsonNode verifyResponse ( Representation representation , boolean shouldSucceed ) throws IOException { String responseBody = representation . getText ( ) ; Assert . assertNotNull ( responseBody , "Null body returned" ) ; ObjectMapper mapper = new ObjectMapper ( ) ; JsonNode json = mapper . readTree ( responseBody ) ; if ( shouldSucceed ) { Assert . assertEquals ( json . get ( "status" ) . asText ( ) . toLowerCase ( ) , "success" , "Error when success should have occurred" ) ; } else { Assert . assertEquals ( json . get ( "status" ) . asText ( ) . toLowerCase ( ) , "error" , "Success when error should have occurred" ) ; } return json . get ( "result" ) ; }
Parses standard response stanza for the actual body and code
 @param representation the response from the service
 @param shouldSucceed  true if the service should succed, false, otherwise
 @return the json object in the "result" field of the response.
Parses standard response stanza for the actual body and code @param representation the response from the service @param shouldSucceed true if the service should succed false otherwise @return the json object in the " result " field of the response .