@Test public void generateQueryWithEventTypesThatHasNoDescriptor() throws Exception { NotificationFilter notificationFilter1 = mock(NotificationFilter.class); when(notificationFilter1.filterExpression(any(DocumentReference.class), any(Collection.class), any(NotificationPreference.class))) .thenReturn(value(EventProperty.PAGE).eq(value("someValue1")).and(value("1").eq(value("1")))); when(notificationFilter1.matchesPreference(any(NotificationPreference.class))).thenReturn(true); when(notificationFilterManager.getFiltersRelatedToNotificationPreference(anyCollection(), any(NotificationPreference.class))) .thenAnswer(invocationOnMock -> ((Collection) invocationOnMock.getArgument(0)).stream()); when(recordableEventDescriptorHelper.hasDescriptor("create", USER_REFERENCE)).thenReturn(false); NotificationParameters parameters = new NotificationParameters(); parameters.user = USER_REFERENCE; parameters.format = NotificationFormat.ALERT; parameters.fromDate = startDate; parameters.filters = Arrays.asList(notificationFilter1); parameters.preferences = Arrays.asList(pref1); parameters.filterPreferences = Arrays.asList(fakeFilterPreference); ExpressionNode node = this.queryGenerator.generateQueryExpression(parameters); assertEquals("(DATE >= \"" + this.startDate.toString() + "\" AND HIDDEN <> true) ORDER BY DATE DESC", node.toString()); }
public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); }
QueryGenerator { public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); } }
QueryGenerator { public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); }  }
QueryGenerator { public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); }  Query generateQuery(NotificationParameters parameters); ExpressionNode generateQueryExpression(NotificationParameters parameters); }
QueryGenerator { public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); }  Query generateQuery(NotificationParameters parameters); ExpressionNode generateQueryExpression(NotificationParameters parameters);  }