public static Test suite() { return SetMultimapTestSuiteBuilder.using( new TestStringSetMultimapGenerator() { @Override protected SetMultimap<String, String> create(Entry<String, String>[] entries) { SetMultimap<String, String> multimap = HashMultimap.create(); for (Entry<String, String> entry : entries) { multimap.put(entry.getKey(), entry.getValue()); } return MapConstraints.constrainedSetMultimap(multimap, Constraint.INSTANCE); } }) .named("MapConstraints.constrainedSetMultimap") .withFeatures( MapFeature.ALLOWS_NULL_KEYS, MapFeature.ALLOWS_NULL_VALUES, MapFeature.ALLOWS_ANY_NULL_QUERIES, MapFeature.GENERAL_PURPOSE, CollectionSize.ANY, CollectionFeature.SERIALIZABLE, CollectionFeature.SUPPORTS_ITERATOR_REMOVE) .createTestSuite(); }