NonI18NModel implements I18NModel { @Override public Map<String, String> getAllValues() { if (StringUtils.isBlank(value)) { return Collections.emptyMap(); } return Collections.singletonMap(DEFAULT, value); } NonI18NModel(final String value); @Override String getValue(final String locale); @Override void putValue(final String locale, final String value); @Override Map<String, String> getAllValues(); @Override I18NModel copy(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testStringNull() throws Exception { final I18NModel model = new NonI18NModel(null); assertNotNull(model.getAllValues()); assertTrue(model.getAllValues().isEmpty()); }
@Test public void testStringEmpty() throws Exception { final I18NModel model = new NonI18NModel(""); assertNotNull(model.getAllValues()); assertTrue(model.getAllValues().isEmpty()); }