NamerFactory { public Namer getNamer(String language) { if (language.equals("NL")) return new DutchNamer(); else if (language.equals("EN")) return new TakatoekalandNamer(); else return null; } private  NamerFactory(); static NamerFactory getInstance(); Namer getNamer(String language);  }
@Test public void testIfTwoCallsLeadToDifferentInstances() { assertNotSame(nf.getNamer("NL"), nf.getNamer("NL")); }
@Test public void testThatInvalidLanguageLeadsToNull() { assertNull(nf.getNamer("")); }
@Test public void testDutch() { assertTrue(nf.getNamer("NL") instanceof DutchNamer); }
@Test public void testTTL() { assertTrue(nf.getNamer("EN") instanceof TakatoekalandNamer); }