@Test public void testGetAnalytics() { List<Sighting> sightings = IntStream.range(1, 13) .mapToObj(this::stubSighting) .collect(toList()); Consumer consumer = new Consumer(); consumer.listen(sightings); Map<String, Map<String, Integer>> analytics = consumer.getAnalytics(); assertThat(analytics.get("state"), is(notNullValue())); assertThat(analytics.get("state").size(), is(1)); assertThat(analytics.get("shape"), is(notNullValue())); assertThat(analytics.get("shape").size(), is(1)); assertThat(analytics.get("year"), is(notNullValue())); assertThat(analytics.get("year").size(), is(1)); assertThat(analytics.get("month"), is(notNullValue())); assertThat(analytics.get("month").size(), is(12)); }
public Map<String, Map<String, Integer>> getAnalytics() { return unmodifiableMap(analytics); }
Consumer { public Map<String, Map<String, Integer>> getAnalytics() { return unmodifiableMap(analytics); } }
Consumer { public Map<String, Map<String, Integer>> getAnalytics() { return unmodifiableMap(analytics); }  }
Consumer { public Map<String, Map<String, Integer>> getAnalytics() { return unmodifiableMap(analytics); }  Map<String, Map<String, Integer>> getAnalytics(); @KafkaListener(id = "ufo", topics = "ufo", containerFactory = "ufoContainerFactory") void listen(List<Sighting> sightings); @EventListener(condition = "event.listenerId.startsWith('ufo-')") ConsumerCompletedEvent eventHandler(ListenerContainerIdleEvent event); }
Consumer { public Map<String, Map<String, Integer>> getAnalytics() { return unmodifiableMap(analytics); }  Map<String, Map<String, Integer>> getAnalytics(); @KafkaListener(id = "ufo", topics = "ufo", containerFactory = "ufoContainerFactory") void listen(List<Sighting> sightings); @EventListener(condition = "event.listenerId.startsWith('ufo-')") ConsumerCompletedEvent eventHandler(ListenerContainerIdleEvent event);  }