ProjectionsContext { public List<AggregationDistinctProjection> getAggregationDistinctProjections() { List<AggregationDistinctProjection> result = new LinkedList<>(); for (Projection each : projections) { if (each instanceof AggregationDistinctProjection) { result.add((AggregationDistinctProjection) each); } } return result; }  boolean isUnqualifiedShorthandProjection(); Optional<String> findAlias(final String projectionName); Optional<Integer> findProjectionIndex(final String projectionName); List<AggregationProjection> getAggregationProjections(); List<AggregationDistinctProjection> getAggregationDistinctProjections(); List<Projection> getExpandProjections();  }
@Test public void assertGetAggregationDistinctProjections() { Projection projection = getAggregationDistinctProjection(); List<AggregationDistinctProjection> items = new ProjectionsContext(0, 0, true, Arrays.asList(projection, getColumnProjection())).getAggregationDistinctProjections(); assertTrue(items.contains(projection)); assertThat(items.size(), is(1)); }