@Test
public void testReadFlatRows() throws Exception {

  ServerStream<FlatRow> stream = mock(ServerStream.class);
  when(dataClientV2.readRowsCallable(any(FlatRowAdapter.class))).thenReturn(serverStreaming);
  when(serverStreaming.call(request)).thenReturn(stream);
  when(stream.iterator()).thenReturn(flatRows.iterator());
  ResultScanner<FlatRow> results = dataGCJClient.readFlatRows(request);
  assertEquals(flatRows.get(0), results.next());
  assertEquals(flatRows.get(1), results.next());
  verify(dataClientV2).readRowsCallable(any(FlatRowAdapter.class));
  verify(serverStreaming).call(request);
  verify(stream).iterator();
}