MapProviderFactory implements Factory<Map<K, Provider<V>>> { public static <K, V> Builder<K, V> builder(int size) { return new Builder<K, V>(size); } private  MapProviderFactory(LinkedHashMap<K, Provider<V>> contributingMap); static Builder<K, V> builder(int size); @Override Map<K, Provider<V>> get();  }
@Test public void nullKey() { thrown.expect(NullPointerException.class); MapProviderFactory.<String, Integer>builder(1).put(null, incrementingIntegerProvider(1)); }
@Test public void nullValue() { thrown.expect(NullPointerException.class); MapProviderFactory.<String, Integer>builder(1).put("Hello", null); }