### Question:
EventUserFilter implements NotificationFilter { @Override public ExpressionNode filterExpression(DocumentReference user, Collection<NotificationFilterPreference> filterPreferences, NotificationPreference preference) { return null; }  @Override FilterPolicy filterEvent(Event event, DocumentReference user,
            Collection<NotificationFilterPreference> filterPreferences, NotificationFormat format); @Override boolean matchesPreference(NotificationPreference preference); @Override ExpressionNode filterExpression(DocumentReference user,
            Collection<NotificationFilterPreference> filterPreferences, NotificationPreference preference); @Override ExpressionNode filterExpression(DocumentReference user,
            Collection<NotificationFilterPreference> filterPreferences,
            NotificationFilterType type, NotificationFormat format); @Override String getName(); @Override int getPriority(); static final String FILTER_NAME; }### Answer:
@Test public void generateFilterExpressionWithPreferences() throws Exception { Collection<NotificationFilterPreference> filterPreferences = mockPreferences(); NotificationPreference notificationPreference = mock(NotificationPreference.class); when(notificationPreference.getFormat()).thenReturn(NotificationFormat.ALERT); assertNull(mocker.getComponentUnderTest().filterExpression(CURRENT_USER, filterPreferences, notificationPreference)); }
@Test public void generateFilterExpression() throws Exception { Collection<NotificationFilterPreference> filterPreferences = mockPreferences(); ExpressionNode node = mocker.getComponentUnderTest().filterExpression(CURRENT_USER, filterPreferences, NotificationFilterType.EXCLUSIVE, NotificationFormat.ALERT); assertNotNull(node); assertEquals("NOT (USER IN (\"userA\", \"userB\", \"userC\"))", node.toString()); }