### Question:
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);  }### Answer:
@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()); } }
@Test public void nothing_registered_get_targets_for_null_throws_illegal_argument_exception() { expected.expect(IllegalArgumentException.class); registryToTest.getTargetsFor(null); }