@Test
public void testReadFlatRowsList() {

  ServerStreamingCallable<Query, FlatRow> serverStreaming = mock(ServerStreamingCallable.class);
  UnaryCallable<Query, List<FlatRow>> unaryCallable = mock(UnaryCallable.class);
  when(dataClientV2.readRowsCallable(any(FlatRowAdapter.class))).thenReturn(serverStreaming);
  when(serverStreaming.all()).thenReturn(unaryCallable);
  when(unaryCallable.call(request)).thenReturn(flatRows);
  List<FlatRow> actualFlatRows = dataGCJClient.readFlatRowsList(request);
  assertEquals(flatRows, actualFlatRows);
  verify(dataClientV2).readRowsCallable(any(FlatRowAdapter.class));
  verify(serverStreaming).all();
  verify(unaryCallable).call(request);
}