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