### Question:
DCLanguage { public String getDisplayName() { Locale locale; if (language.equals("other")) { return "(Other)"; } else if (language.equals("")) { return "N/A"; } else { locale = new Locale(language, country); return locale.getDisplayName(); } } DCLanguage(String l); String toString(); final void setLanguage(String l); String getDisplayName();  }### Answer:
@Test public void testGetDisplayName() { dc = new DCLanguage(null); assertThat("testGetDisplayName 0", dc.getDisplayName(), equalTo("N/A")); dc = new DCLanguage(""); assertThat("testGetDisplayName 1", dc.getDisplayName(), equalTo("N/A")); dc = new DCLanguage("other"); assertThat("testGetDisplayName 2", dc.getDisplayName(), equalTo("(Other)")); dc = new DCLanguage("en"); assertThat("testGetDisplayName 3", dc.getDisplayName(), equalTo(new Locale("en","").getDisplayName())); dc = new DCLanguage("en_GB"); assertThat("testGetDisplayName 4", dc.getDisplayName(), equalTo(new Locale("en","GB").getDisplayName())); }
@Test public void testGetDisplayName() { dc = new DCLanguage(null); assertThat("testGetDisplayName 0", dc.getDisplayName(), equalTo("N/A")); dc = new DCLanguage(""); assertThat("testGetDisplayName 1", dc.getDisplayName(), equalTo("N/A")); dc = new DCLanguage("other"); assertThat("testGetDisplayName 2", dc.getDisplayName(), equalTo("(Other)")); dc = new DCLanguage("en"); assertThat("testGetDisplayName 3", dc.getDisplayName(), equalTo(new Locale("en", "").getDisplayName())); dc = new DCLanguage("en_GB"); assertThat("testGetDisplayName 4", dc.getDisplayName(), equalTo(new Locale("en", "GB").getDisplayName())); }