final Node result = c.deepCreateNode(path, s, null);
assertTrue("Expecting deepCreate to return existing node", result == n);
}
public void testCreateFromRoot() throws Exception {
final Mockery mockery = new Mockery();
final DeepNodeCreator c = new DeepNodeCreator();
final String rootPath = "/";
final String fooPath = "/foo";
final String barPath = "/foo/bar";
final Session s = mockery.mock(Session.class);
final Node root = mockery.mock(Node.class, rootPath);
final Node foo = mockery.mock(Node.class, fooPath);
final Node bar = mockery.mock(Node.class, barPath);
final String testNodeType = "NT_TEST";
mockery.checking(new Expectations() {{
allowing(s).itemExists(barPath);
will(returnValue(false));
allowing(s).itemExists(fooPath);
will(returnValue(false));