@Test public void testCaseQueryCompleted() { given() .queryParam("completed", true) .then().expect() .statusCode(Status.OK.getStatusCode()) .when() .get(HISTORIC_CASE_INSTANCE_RESOURCE_URL); InOrder inOrder = inOrder(mockedQuery); inOrder.verify(mockedQuery).completed(); inOrder.verify(mockedQuery).list(); }
@Test public void testCaseQueryCompletedAsPost() { Map<String, Boolean> body = new HashMap<String, Boolean>(); body.put("completed", true); given() .contentType(POST_JSON_CONTENT_TYPE) .body(body) .then().expect() .statusCode(Status.OK.getStatusCode()) .when() .post(HISTORIC_CASE_INSTANCE_RESOURCE_URL); InOrder inOrder = inOrder(mockedQuery); inOrder.verify(mockedQuery).completed(); inOrder.verify(mockedQuery).list(); }
assertCount(1, historicQuery().completed()); assertCount(1, historicQuery().notClosed());
assertCount(1, historicQuery().completed()); assertCount(1, historicQuery().notClosed());