@Test public void nothing_registered_get_targets_for_any_type_returns_not_null_but_empty_list() { for (TargetType type: TargetType.values()) { List<Target> targetsFor = registryToTest.getTargetsFor(type); assertNotNull("Type "+type+" results in null ",targetsFor); assertTrue("Type "+type+" is not empty",targetsFor.isEmpty()); } }
public List<Target> getTargetsFor(TargetType type){ notNull(type, "given type may not be null!"); List<Target> list = getListFor(type); return Collections.unmodifiableList(list); }
TargetRegistry { public List<Target> getTargetsFor(TargetType type){ notNull(type, "given type may not be null!"); List<Target> list = getListFor(type); return Collections.unmodifiableList(list); } }
TargetRegistry { public List<Target> getTargetsFor(TargetType type){ notNull(type, "given type may not be null!"); List<Target> list = getListFor(type); return Collections.unmodifiableList(list); } TargetRegistry(); }
TargetRegistry { public List<Target> getTargetsFor(TargetType type){ notNull(type, "given type may not be null!"); List<Target> list = getListFor(type); return Collections.unmodifiableList(list); } TargetRegistry(); void register(Target target); TargetRegistryInfo createRegistryInfo(TargetType type); List<Target> getTargetsFor(TargetType type); }
TargetRegistry { public List<Target> getTargetsFor(TargetType type){ notNull(type, "given type may not be null!"); List<Target> list = getListFor(type); return Collections.unmodifiableList(list); } TargetRegistry(); void register(Target target); TargetRegistryInfo createRegistryInfo(TargetType type); List<Target> getTargetsFor(TargetType type);  }