@Test public void testCaseQueryClosed() { given() .queryParam("closed", true) .then().expect() .statusCode(Status.OK.getStatusCode()) .when() .get(HISTORIC_CASE_INSTANCE_RESOURCE_URL); InOrder inOrder = inOrder(mockedQuery); inOrder.verify(mockedQuery).closed(); inOrder.verify(mockedQuery).list(); }
@Test public void testCaseQueryClosedAsPost() { Map<String, Boolean> body = new HashMap<String, Boolean>(); body.put("closed", 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).closed(); inOrder.verify(mockedQuery).list(); }
assertCount(1, historicQuery().closed()); assertCount(0, historicQuery().notClosed());
assertCount(1, historicQuery().closed()); assertCount(0, historicQuery().notClosed());