### Question:
EventTypeListenerEventFilter implements ListenerEventFilter { @Override public boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType) { Class<? extends ListenerEvent> eventClass = listenerEvent.getEventType().eventClass(); return !eventClasses.contains(eventClass); } EventTypeListenerEventFilter(List<Class<? extends ListenerEvent>> eventClasses); @Override boolean isFiltered(ListenerEvent listenerEvent, LifecycleEventType lifecycleEventType);  }### Answer:
@Test public void typicalFilterAlterPartitionEvent() { when(alterPartitionEvent.getEventType()).thenReturn(ALTER_PARTITION); boolean filter = listenerEventFilter.isFiltered(alterPartitionEvent, UNREFERENCED); assertThat(filter).isFalse(); }
@Test public void typicalFilterAlterTableEvent() { when(alterTableEvent.getEventType()).thenReturn(ALTER_TABLE); boolean filter = listenerEventFilter.isFiltered(alterTableEvent, UNREFERENCED); assertThat(filter).isFalse(); }
@Test public void typicalFilterDropPartitionEvent() { when(dropPartitionEvent.getEventType()).thenReturn(DROP_PARTITION); boolean filter = listenerEventFilter.isFiltered(dropPartitionEvent, UNREFERENCED); assertThat(filter).isFalse(); }
@Test public void typicalFilterDropTableEvent() { when(dropTableEvent.getEventType()).thenReturn(DROP_TABLE); boolean filter = listenerEventFilter.isFiltered(dropTableEvent, UNREFERENCED); assertThat(filter).isFalse(); }
@Test public void typicalFilterOtherEvent() { when(addPartitionEvent.getEventType()).thenReturn(ADD_PARTITION); boolean filter = listenerEventFilter.isFiltered(addPartitionEvent, UNREFERENCED); assertThat(filter).isTrue(); }