Esempio n. 1
0
  @Test
  public void when_load_read_global_errors() throws Exception {

    // WHEN
    ConfigLoader.loadGlobalErrorsConfig(false);

    // THEN
    Map<Integer, String> errors = ConfigLoader.getLoadedGlobalErrors();
    assertEquals(errors.get(401), "{\"error\":\"custom unauthorized response\"}");
    assertEquals(errors.get(404), "{\"error\":\"custom resource not found\"}");
    assertEquals(errors.get(500), "{\"error\":\"custom ISE response\"}");
  }