in src/it/java/com/epam/digital/data/platform/bpwebservice/it/controller/StartBpControllerIT.java [94:114]
void startBp_noSuchBpIsDefined() throws Exception {
var request = fileContent("/startBp/noSuchBpIsDefined/json/startBpRequest.json");
var responseString = mockMvc.perform(MockMvcRequestBuilders.post("/api/start-bp")
.accept(MediaType.APPLICATION_JSON)
.contentType(MediaType.APPLICATION_JSON)
.header("X-Access-Token", testUserToken)
.content(request))
.andExpect(status().isUnprocessableEntity())
.andReturn()
.getResponse()
.getContentAsString();
var response = objectMapper.readValue(responseString, SystemErrorDto.class);
assertThat(response)
.hasFieldOrProperty("traceId")
.hasFieldOrPropertyWithValue("code", "422")
.hasFieldOrPropertyWithValue("localizedMessage", null)
.hasFieldOrPropertyWithValue("message",
"No such business process no-such-business-process-defined is defined in trembita.process_definitions");
}