@Test public void getQueryResult() throws Exception { int fetchSize = mock(Integer.class); List colunmnList = new ArrayList(); DetailFilter filter = mock(DetailFilter.class); ImmutableBitMap filterIndex = mock(ImmutableBitMap.class); when(filter.createFilterIndex()).thenReturn(filterIndex); SegmentDetailResultSet segmentDetailResultSet = mock(SegmentDetailResultSet.class); whenNew(SegmentDetailResultSet.class).withArguments(fetchSize, colunmnList, filter).thenReturn(segmentDetailResultSet); Assert.assertEquals(segmentDetailResultSet, new DetailSegmentQuery(fetchSize, colunmnList, filter).getQueryResult()); verifyNew(SegmentDetailResultSet.class).withArguments(fetchSize, colunmnList, filter); }
@Override public DetailQueryResultSet getQueryResult() { return new SegmentDetailResultSet(fetchSize, columnList, filter); }
DetailSegmentQuery extends AbstractDetailSegmentQuery { @Override public DetailQueryResultSet getQueryResult() { return new SegmentDetailResultSet(fetchSize, columnList, filter); } }
DetailSegmentQuery extends AbstractDetailSegmentQuery { @Override public DetailQueryResultSet getQueryResult() { return new SegmentDetailResultSet(fetchSize, columnList, filter); } DetailSegmentQuery(int fetchSize, List<Pair<Column, IndexInfo>> columnList, DetailFilter filter); }
DetailSegmentQuery extends AbstractDetailSegmentQuery { @Override public DetailQueryResultSet getQueryResult() { return new SegmentDetailResultSet(fetchSize, columnList, filter); } DetailSegmentQuery(int fetchSize, List<Pair<Column, IndexInfo>> columnList, DetailFilter filter); @Override DetailQueryResultSet getQueryResult(); }
DetailSegmentQuery extends AbstractDetailSegmentQuery { @Override public DetailQueryResultSet getQueryResult() { return new SegmentDetailResultSet(fetchSize, columnList, filter); } DetailSegmentQuery(int fetchSize, List<Pair<Column, IndexInfo>> columnList, DetailFilter filter); @Override DetailQueryResultSet getQueryResult();  }