in src/it/java/com/epam/digital/data/platform/bphistory/service/api/controller/ProcessRuntimeControllerIT.java [100:117]
void countOfficerActiveProcessInstances() throws Exception {
createBpmHistoryProcessAndSaveToDatabase("officerActiveProcess", "processDefinition",
LocalDateTime.of(2022, 1, 11, 12, 16), "ACTIVE", "testuser", null);
createBpmHistoryProcessAndSaveToDatabase("officerPendingProcess", "processDefinition",
LocalDateTime.of(2022, 1, 11, 12, 17), "ACTIVE", "testuser", null);
createBpmHistoryProcessAndSaveToDatabase("officerSuspendedProcess", "processDefinition",
LocalDateTime.of(2022, 1, 11, 12, 18), "ACTIVE", "testuser", null);
createBpmHistoryProcessAndSaveToDatabase("citizenSuspendedProcess", "processDefinition",
LocalDateTime.of(2022, 1, 11, 12, 37), "SUSPENDED", "testuser", null);
var expectedJson = TestUtils.readClassPathResource(
"/json/countOfficerActiveProcessInstances.json");
mockMvc.perform(get("/api/runtime/process-instances/count")
.header(X_ACCESS_TOKEN.getHeaderName(), OFFICER_TOKEN))
.andExpect(status().is2xxSuccessful())
.andExpect(content().json(expectedJson));
}