in src/it/java/com/epam/digital/data/platform/bphistory/service/api/controller/ProcessRuntimeControllerIT.java [82:97]
void countCitizenActiveProcessInstances() throws Exception {
createBpmHistoryProcessAndSaveToDatabase("citizenActiveProcess", "processDefinition",
LocalDateTime.of(2022, 1, 11, 12, 35), "ACTIVE", "testuser", null);
createBpmHistoryProcessAndSaveToDatabase("citizenPendingProcess", "processDefinition",
LocalDateTime.of(2022, 1, 11, 12, 36), "ACTIVE", "testuser", null);
createBpmHistoryProcessAndSaveToDatabase("citizenSuspendedProcess", "processDefinition",
LocalDateTime.of(2022, 1, 11, 12, 37), "SUSPENDED", "testuser", null);
var expectedJson = TestUtils.readClassPathResource(
"/json/countCitizenActiveProcessInstances.json");
mockMvc.perform(get("/api/runtime/process-instances/count")
.header(X_ACCESS_TOKEN.getHeaderName(), CITIZEN_TOKEN))
.andExpect(status().is2xxSuccessful())
.andExpect(content().json(expectedJson));
}