### Question:
VirtualSinkSource extends NamedSink implements Source { @Override public Iterable<Row> query(String query, Object... params) { return this.rows; } VirtualSinkSource();  VirtualSinkSource(String name, List<Row> entries); int getNumberOfRows(); List<Row> getRows(); Row getRow(int index); VirtualSinkSource addRow(Row row); @Override Iterable<Row> query(String query, Object... params); @Override void processRow(Row entries); @Override String toString(); String mapToString(Row columns); @Override int hashCode(); @Override boolean equals(Object obj);  }### Answer:
@Test public void query() { VirtualSinkSource source = getSource(); Iterable<Row> results = source.query(); int rowCounter = 0; for (Row list : results) { assertNotNull(list); assertThat(list.getNumberOfColumns(), is(2)); rowCounter++; } assertThat(rowCounter, is(2)); }