I18nEntity extends AbstractEntity implements Serializable, Comparable<I18nEntity> { public static String getNotNullName(I18nEntity entity) { String result = ""; if (entity != null) { if (StringUtils.isNotBlank(entity.getEnglishName())) { result = entity.getEnglishName(); } else if (StringUtils.isNotBlank(entity.getFrenchName())) { result = entity.getFrenchName(); } else if (StringUtils.isNotBlank(entity.getDutchName())) { result = entity.getDutchName(); } } 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 testGetNotNullName() throws Exception { assertNotNull(I18nEntity.getNotNullName(DATA_POINT1)); assertNotNull(I18nEntity.getNotNullName(DATA_POINT2)); assertNotNull(I18nEntity.getNotNullName(DATA_POINT3)); assertNotNull(I18nEntity.getNotNullName(DATA_POINT4)); }