@Test
public void testNext() throws Exception {

    RowIterator delegate = mock(RowIterator.class);
    RowIteratorFacade<Session> facade = getFacade(delegate);
    final Row value = mock(Row.class);
    final String path = "/correct/path";
    when(value.getPath()).thenReturn(path);
    when(delegate.nextRow()).thenReturn(value);
    final Object fromFacade = facade.next();
    assertTrue("is node", fromFacade instanceof Row);
    final Row nodeFromFacade = (Row) fromFacade;
    assertEquals("same path", path, nodeFromFacade.getPath());
    assertTrue("is facade", nodeFromFacade instanceof RowFacade);
}