in src/it/java/com/epam/digital/data/platform/usrtaskmgt/controller/UserTaskControllerIT.java [112:132]
void shouldGetLightweightTasks() {
mockBpmsRequest(StubRequest.builder()
.path("/api/extended/task/lightweight")
.method(HttpMethod.POST)
.status(200)
.responseBody(fileContent("/json/getLightweightTasksResponse.json"))
.responseHeaders(Map.of("Content-Type", List.of("application/json")))
.build());
var request = get("/api/task/lightweight")
.accept(MediaType.APPLICATION_JSON_VALUE);
var userTaskDtos = Arrays.asList(performForObjectAsOfficer(request, DdmTaskDto[].class));
assertThat(userTaskDtos).hasSize(2);
assertThat(userTaskDtos.get(0))
.hasFieldOrPropertyWithValue("id", "task1")
.hasFieldOrPropertyWithValue("assignee", "testuser");
assertThat(userTaskDtos.get(1))
.hasFieldOrPropertyWithValue("id", "task2")
.hasFieldOrPropertyWithValue("assignee", "testuser");
}