@Test public void testJsonToMap() { assertThat(errorResponseCodeMappings.size()).isEqualTo(4); assertThat(errorResponseCodeMappings.containsKey("SQL_CONNECTOR_ERROR")).isTrue(); }
public static Map<String, Integer> jsonToMap(String property) { try { if (ObjectHelper.isEmpty(property)) { return Collections.emptyMap(); } return JsonUtils.reader().forType(STRING_MAP_TYPE).readValue(property); } catch (IOException e) { LOG.warn(String.format("Failed to read error code mapping property %s: %s", property, e.getMessage()), e); return Collections.emptyMap(); } }
ErrorMapper { public static Map<String, Integer> jsonToMap(String property) { try { if (ObjectHelper.isEmpty(property)) { return Collections.emptyMap(); } return JsonUtils.reader().forType(STRING_MAP_TYPE).readValue(property); } catch (IOException e) { LOG.warn(String.format("Failed to read error code mapping property %s: %s", property, e.getMessage()), e); return Collections.emptyMap(); } } }
ErrorMapper { public static Map<String, Integer> jsonToMap(String property) { try { if (ObjectHelper.isEmpty(property)) { return Collections.emptyMap(); } return JsonUtils.reader().forType(STRING_MAP_TYPE).readValue(property); } catch (IOException e) { LOG.warn(String.format("Failed to read error code mapping property %s: %s", property, e.getMessage()), e); return Collections.emptyMap(); } } private  ErrorMapper(); }
ErrorMapper { public static Map<String, Integer> jsonToMap(String property) { try { if (ObjectHelper.isEmpty(property)) { return Collections.emptyMap(); } return JsonUtils.reader().forType(STRING_MAP_TYPE).readValue(property); } catch (IOException e) { LOG.warn(String.format("Failed to read error code mapping property %s: %s", property, e.getMessage()), e); return Collections.emptyMap(); } } private  ErrorMapper(); static Map<String, Integer> jsonToMap(String property); static ErrorStatusInfo mapError(final Exception exception, final Map<String, Integer> httpResponseCodeMappings,
            final Integer defaultResponseCode); }
ErrorMapper { public static Map<String, Integer> jsonToMap(String property) { try { if (ObjectHelper.isEmpty(property)) { return Collections.emptyMap(); } return JsonUtils.reader().forType(STRING_MAP_TYPE).readValue(property); } catch (IOException e) { LOG.warn(String.format("Failed to read error code mapping property %s: %s", property, e.getMessage()), e); return Collections.emptyMap(); } } private  ErrorMapper(); static Map<String, Integer> jsonToMap(String property); static ErrorStatusInfo mapError(final Exception exception, final Map<String, Integer> httpResponseCodeMappings,
            final Integer defaultResponseCode);  }