### Question:
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);  }### Answer:
@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); }
@Test public void typicalFilterMessage() { setupFilterMocks(false, true); List<HousekeepingEntity> housekeepingEntities = handler.handleMessage(messageEvent); assertTrue(housekeepingEntities.isEmpty()); }