@Test public void typicalHandleMessage() { setupFilterMocks(false, false); when(generator.generate(listenerEvent, CLIENT_ID)).thenReturn(List.of(mock(HousekeepingEntity.class))); List<HousekeepingEntity> housekeepingEntities = handler.handleMessage(messageEvent); assertThat(housekeepingEntities.size()).isEqualTo(1); }
public List<HousekeepingEntity> handleMessage(MessageEvent event) { ListenerEvent listenerEvent = event.getEvent(); if (shouldFilterMessage(listenerEvent)) { return Collections.emptyList(); } return generateHousekeepingEntities(listenerEvent); }
MessageEventHandler { public List<HousekeepingEntity> handleMessage(MessageEvent event) { ListenerEvent listenerEvent = event.getEvent(); if (shouldFilterMessage(listenerEvent)) { return Collections.emptyList(); } return generateHousekeepingEntities(listenerEvent); } }
MessageEventHandler { public List<HousekeepingEntity> handleMessage(MessageEvent event) { ListenerEvent listenerEvent = event.getEvent(); if (shouldFilterMessage(listenerEvent)) { return Collections.emptyList(); } return generateHousekeepingEntities(listenerEvent); } MessageEventHandler(
      HousekeepingEntityGenerator generator,
      List<ListenerEventFilter> filters
  ); }
MessageEventHandler { public List<HousekeepingEntity> handleMessage(MessageEvent event) { ListenerEvent listenerEvent = event.getEvent(); if (shouldFilterMessage(listenerEvent)) { return Collections.emptyList(); } return generateHousekeepingEntities(listenerEvent); } MessageEventHandler(
      HousekeepingEntityGenerator generator,
      List<ListenerEventFilter> filters
  ); List<HousekeepingEntity> handleMessage(MessageEvent event); }
MessageEventHandler { public List<HousekeepingEntity> handleMessage(MessageEvent event) { ListenerEvent listenerEvent = event.getEvent(); if (shouldFilterMessage(listenerEvent)) { return Collections.emptyList(); } return generateHousekeepingEntities(listenerEvent); } MessageEventHandler(
      HousekeepingEntityGenerator generator,
      List<ListenerEventFilter> filters
  ); List<HousekeepingEntity> handleMessage(MessageEvent event);  }