use of org.mule.tck.testmodels.fruit.Kiwi in project mule by mulesoft.
the class ImmutableMapCollectorTestCase method collect.
@Test
public void collect() {
final List<Fruit> fruits = Arrays.asList(new Apple(), new Banana(), new Kiwi());
Map<String, Fruit> map = fruits.stream().collect(collector);
assertThat(map.size(), is(3));
fruits.forEach(fruit -> {
Fruit value = map.get(fruit.getClass().getName());
assertThat(value, sameInstance(fruit));
});
}