I18nEntity extends AbstractEntity implements Serializable, Comparable<I18nEntity> { public String getName(Language language) { String result = null; if (language != null) { switch (language) { case EN: result = getEnglishName(); break; case NL: result = getDutchName(); break; case FR: result = getFrenchName(); break; default: result = ""; } } return result; } protected  I18nEntity();  I18nEntity(final String englishName);  I18nEntity(final String name, Language language);  I18nEntity(final String englishName, final String dutchName, final String frenchName); @Override boolean equals(Object obj); @Override int hashCode(); String getEnglishName(); String getFrenchName(); String getDutchName(); String getName(Language language); @Override int compareTo(@SuppressWarnings("NullableProblems") I18nEntity entity); static String getNotNullName(I18nEntity entity);  }
@Test public void testAccessors() { assertNotNull(DATA_POINT1.getName(Language.EN)); assertNull(DATA_POINT2.getName(Language.NL)); assertNotNull(DATA_POINT3.getName(Language.FR)); assertNotNull(DATA_POINT4.getName(Language.NL)); }