TypeCollector { public Type getType(String type) { if (type == null) { throw new NullPointerException("type"); } if (!types.containsKey(type)) { Type newType = new Type(logger, type); CharSequence initialData = initializer.initialData(type); if (initialData != null) { newType.fromProviderNamesList(initialData.toString()); for (String provider : removed) { newType.removeProvider(provider); } } types.put(type, newType); } return types.get(type); } TypeCollector(Initializer initializer, Logger logger); void cache(); boolean isModified(); Type getType(String type); Collection<Type> types(); void removeProvider(String provider); @Override String toString();  }
@Test public void testGetTypeNull() { assertThrows(NullPointerException.class, () -> collector.getType(null)); }