Skip to content

Instantly share code, notes, and snippets.

@kozake
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kozake/0f7b50617fb5f17351d9 to your computer and use it in GitHub Desktop.
Save kozake/0f7b50617fb5f17351d9 to your computer and use it in GitHub Desktop.
mapOfItemsToSuppliersByGSCollections
@Test
public void mapOfItemsToSuppliersByGSCollections()
{
final MutableMultimap<String, Supplier> itemsToSuppliers =
ArrayAdapter.adapt(this.company.getSuppliers())
.groupByEach(s -> ArrayAdapter.adapt(s.getItemNames()));
Verify.assertIterableSize(
"should be 2 suppliers for sofa",
2,
itemsToSuppliers.get("sofa"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment