LanguageIdentifier { public String getLanguage() { return language; } LanguageIdentifier(LanguageProfile profile);  LanguageIdentifier(String content); static void addProfile(String language, LanguageProfile profile); String getLanguage(); boolean isReasonablyCertain(); static void initProfiles(); static void initProfiles(Map<String, LanguageProfile> profilesMap); static void clearProfiles(); static boolean hasErrors(); static String getErrors(); static Set<String> getSupportedLanguages(); @Override String toString();  }
@Test public void testEstonia() throws Exception { final String estonian = "et"; ProfilingWriter writer = new ProfilingWriter(); writeTo(estonian, writer); LanguageIdentifier identifier = new LanguageIdentifier(writer.getProfile()); assertEquals(estonian, identifier.getLanguage()); }