ProjectionsContext { public List<AggregationProjection> getAggregationProjections() { List<AggregationProjection> result = new LinkedList<>(); for (Projection each : projections) { if (each instanceof AggregationProjection) { AggregationProjection aggregationProjection = (AggregationProjection) each; result.add(aggregationProjection); result.addAll(aggregationProjection.getDerivedAggregationProjections()); } } 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 assertGetAggregationProjections() { Projection projection = getAggregationProjection(); List<AggregationProjection> items = new ProjectionsContext(0, 0, true, Arrays.asList(projection, getColumnProjection())).getAggregationProjections(); assertTrue(items.contains(projection)); assertThat(items.size(), is(1)); }