@Test
public void testClose() throws Exception {

  List<String> listOfOneElement = ImmutableList.of(TEST_VALUE, TEST_VALUE);
  when(stream.iterator()).thenReturn(listOfOneElement.iterator());
  doNothing().when(stream).cancel();
  try (ResultScanner<String> closedScanner = new RowResultScanner<>(stream, TEST_ARRAY)) {
    assertEquals(TEST_VALUE, closedScanner.next());
  }
  verify(stream).iterator();
  // verifying call the RowResultScanner#close.
  verify(stream).cancel();
}