void startBp_cephError()

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


  void startBp_cephError() throws Exception {
    var request = fileContent("/startBp/cephError/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)
        .hasFieldOrProperty("message");
  }