@Test
public void testDumpNode() throws RepositoryException {

    Node node = createNiceMock(Node.class);
    PropertyIterator iterator = createMock(PropertyIterator.class);
    NodeIterator iter = createMock(NodeIterator.class);
    expect(node.getPath()).andReturn("path");
    expect(node.getProperties()).andReturn(iterator);
    expect(iterator.hasNext()).andReturn(false);
    expect(node.getNodes()).andReturn(iter);
    expect(iter.hasNext()).andReturn(false);
    expect(session.getRootNode()).andReturn(node);
    replay(session);
    replay(sessionFactory);
    replay(node);
    jcrTemplate.dump(null);
    verify(node);
}