in src/it/java/com/epam/digital/data/platform/auth/generator/client/BpmsRestClientIT.java [91:107]
void shouldCreateProcessInstanceAuthorizations() throws JsonProcessingException {
var expectedCountResponse = new CountResultDto(1);
var body = List.of("officer");
bpmsWireMockServer.addStubMapping(
stubFor(post(urlPathEqualTo("/api/extended/authorizations/process-instance/create"))
.withHeader("Content-Type", equalTo("application/json"))
.withHeader("X-Access-Token", equalTo("token"))
.withRequestBody(equalToJson(objectMapper.writeValueAsString(body)))
.willReturn(
aResponse().withBody(objectMapper.writeValueAsString(expectedCountResponse)))));
var result = restClient.createProcessInstanceAuthorizations(bpmsUrl, "token", body);
assertThat(result).isNotNull();
assertThat(result).isEqualTo(expectedCountResponse);
}