@Test
public void testNextVersion() throws Exception {

    VersionIterator delegate = mock(VersionIterator.class);
    VersionIteratorFacade<Session> facade = getFacade(delegate);
    final Version value = mock(Version.class);
    final String path = "/correct/path";
    when(value.getPath()).thenReturn(path);
    when(delegate.nextVersion()).thenReturn(value);
    final Version fromFacade = facade.nextVersion();
    assertEquals("same path", path, fromFacade.getPath());
    assertTrue("is facade", fromFacade instanceof VersionFacade);
}