@Test(expected = NullPointerException.class) public void testGetCalendarStrategy() { CalendarStrategy strategy = factory.get(null); Assert.assertNull(strategy); }
public CalendarStrategy get(CalendarId id) throws NullPointerException { CalendarStrategy strategy = allModules.get(id); if (strategy == null) { throw new NullPointerException(); } return strategy; }
CalendarFactory implements Iterable<CalendarStrategy> { public CalendarStrategy get(CalendarId id) throws NullPointerException { CalendarStrategy strategy = allModules.get(id); if (strategy == null) { throw new NullPointerException(); } return strategy; } }
CalendarFactory implements Iterable<CalendarStrategy> { public CalendarStrategy get(CalendarId id) throws NullPointerException { CalendarStrategy strategy = allModules.get(id); if (strategy == null) { throw new NullPointerException(); } return strategy; } private  CalendarFactory(); }
CalendarFactory implements Iterable<CalendarStrategy> { public CalendarStrategy get(CalendarId id) throws NullPointerException { CalendarStrategy strategy = allModules.get(id); if (strategy == null) { throw new NullPointerException(); } return strategy; } private  CalendarFactory(); static CalendarFactory getInstance(); CalendarStrategy get(CalendarId id); @Override Iterator<CalendarStrategy> iterator(); }
CalendarFactory implements Iterable<CalendarStrategy> { public CalendarStrategy get(CalendarId id) throws NullPointerException { CalendarStrategy strategy = allModules.get(id); if (strategy == null) { throw new NullPointerException(); } return strategy; } private  CalendarFactory(); static CalendarFactory getInstance(); CalendarStrategy get(CalendarId id); @Override Iterator<CalendarStrategy> iterator();  }