@Test
public void testToLanguageIdentifier() {

    final String id1 =
        LanguageIdentifierConverter.toLanguageIdentifier(Locale.GERMAN);
    Assert.assertEquals("de", id1);
    final String id2 =
        LanguageIdentifierConverter.toLanguageIdentifier(Locale.US);
    Assert.assertEquals("en-US", id2);
    final String id3 =
        LanguageIdentifierConverter.toLanguageIdentifier(null);
    Assert.assertNull(id3);
}