void startBp_bpmsError()

in src/it/java/com/epam/digital/data/platform/bpwebservice/it/controller/StartBpControllerIT.java [192:214]


  void startBp_bpmsError() throws Exception {
    mockPutCephStartForm("bpmsError",
        fileContent("/startBp/bpmsError/json/cephContent.json").replaceAll("[ \r\n]", ""));

    var request = fileContent("/startBp/bpmsError/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().isInternalServerError())
        .andReturn()
        .getResponse()
        .getContentAsString();

    var response = objectMapper.readValue(responseString, SystemErrorDto.class);
    assertThat(response)
        .hasFieldOrProperty("traceId")
        .hasFieldOrPropertyWithValue("code", "500")
        .hasFieldOrPropertyWithValue("localizedMessage", null)
        .hasFieldOrPropertyWithValue("message", null);
  }