@Test
public void testDeploymentRetrieval() {
InOrder inOrder = Mockito.inOrder(mockedQuery);
String queryKey = "Name";
Response response = given().queryParam("nameLike", queryKey)
.then().expect().statusCode(Status.OK.getStatusCode())
.when().get(DEPLOYMENT_QUERY_URL);
// assert query invocation
inOrder.verify(mockedQuery).deploymentNameLike(queryKey);
inOrder.verify(mockedQuery).list();
String content = response.asString();
List<String> deployments = from(content).getList("");
Assert.assertEquals("There should be one deployment returned.", 1, deployments.size());
Assert.assertNotNull("There should be one deployment returned", deployments.get(0));
String returnedId = from(content).getString("[0].id");