@Test public void getCustomersByDonutTypesOrdered() { var multimap = this.donutShop.getCustomersByDonutTypesOrdered(); Assert.assertEquals(6, multimap.keySet().size()); Verify.assertIterableSize(1, multimap.get(DonutType.BAVARIAN_CREAM)); Verify.assertAllSatisfy( multimap.get(DonutType.BAVARIAN_CREAM), customer -> customer.named("Ted Smith")); }
public Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered() { return this.customers.groupByEach(Customer::getDonutTypesOrdered); }
DonutShop { public Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered() { return this.customers.groupByEach(Customer::getDonutTypesOrdered); } }
DonutShop { public Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered() { return this.customers.groupByEach(Customer::getDonutTypesOrdered); }  }
DonutShop { public Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered() { return this.customers.groupByEach(Customer::getDonutTypesOrdered); }  void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonuts(); MutableList<ObjectIntPair<DonutType>> getTopDonuts(int n); double getTotalDeliveryValueFor(LocalDate date); Customer getTopCustomer(); Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered(); DoubleSummaryStatistics getDonutPriceStatistics(LocalDate fromDate, LocalDate toDate); @Override String toString(); }
DonutShop { public Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered() { return this.customers.groupByEach(Customer::getDonutTypesOrdered); }  void makeDonuts(DonutType type, int count); Delivery deliverOrder(String customerName, LocalDate date, String donutTypeCounts); Bag<DonutType> getDonuts(); MutableList<ObjectIntPair<DonutType>> getTopDonuts(int n); double getTotalDeliveryValueFor(LocalDate date); Customer getTopCustomer(); Multimap<DonutType, Customer> getCustomersByDonutTypesOrdered(); DoubleSummaryStatistics getDonutPriceStatistics(LocalDate fromDate, LocalDate toDate); @Override String toString();  }