JstlLocalization implements Localization { public String getMessage(String key, Object... parameters) { try { String content = getBundle().getString(key); return MessageFormat.format(content, parameters); } catch (MissingResourceException e) { return "???" + key + "???"; } } JstlLocalization(RequestInfo request); ResourceBundle getBundle(); Locale getLocale(); Locale getFallbackLocale(); String getMessage(String key, Object... parameters);  }
@Test public void keyNotFound() { String value = localization.getMessage("my.notfound.key"); assertThat(value, startsWith("???")); assertThat(value, endsWith("???")); }