@Test @DisplayName("convert type query to EntityFilters") void convertTypeToFilters() { String typeName = " com.example.EventType "; EventFilter validFilter = filterForType(typeName); EventFilter invalidFilter = filterForType(" "); EventStreamQuery query = EventStreamQuery .newBuilder() .addFilter(validFilter) .addFilter(invalidFilter) .build(); TargetFilters entityFilters = convert(query); assertEquals(1, entityFilters.getFilterCount()); CompositeFilter compositeFilter = entityFilters.getFilter(0); List<Filter> filters = compositeFilter.getFilterList(); assertEquals(CompositeOperator.EITHER, compositeFilter.getOperator()); assertEquals(1, filters.size()); Any typeNameAsAny = filters.get(0) .getValue(); assertEquals(typeName.trim(), toObject(typeNameAsAny, String.class)); }
static TargetFilters convert(EventStreamQuery query) { TargetFilters result = new QueryToFilters(query).convert(); return result; }
QueryToFilters { static TargetFilters convert(EventStreamQuery query) { TargetFilters result = new QueryToFilters(query).convert(); return result; } }
QueryToFilters { static TargetFilters convert(EventStreamQuery query) { TargetFilters result = new QueryToFilters(query).convert(); return result; } private  QueryToFilters(EventStreamQuery query); }
QueryToFilters { static TargetFilters convert(EventStreamQuery query) { TargetFilters result = new QueryToFilters(query).convert(); return result; } private  QueryToFilters(EventStreamQuery query);  }
QueryToFilters { static TargetFilters convert(EventStreamQuery query) { TargetFilters result = new QueryToFilters(query).convert(); return result; } private  QueryToFilters(EventStreamQuery query);   }