private String performRequestAndExpectStatusAndReturn()

in src/it/java/com/epam/digital/data/platform/starter/security/WebSecurityConfigIT.java [127:136]


  private String performRequestAndExpectStatusAndReturn(String urlTemplate, String token,
      int expectedStatus) {
    try {
      return mockMvc.perform(MockMvcRequestBuilders.get(urlTemplate)
          .header(JwtAuthenticationFilter.AUTHORIZATION_HEADER, token))
          .andExpect(status().is(expectedStatus)).andReturn().getResponse().getContentAsString();
    } catch (Exception e) {
      throw new AssertionError(e);
    }
  }