// Create a mock child node ...
AbstractJcrNode childJcrNode = mock(AbstractJcrNode.class);
children.add(childJcrNode);
childNodesByRef.put(ref, childJcrNode);
}
NodeResolver resolver = new NodeResolver() {
@SuppressWarnings( "synthetic-access" )
@Override
public Node nodeFrom( ChildReference ref ) {
return childNodesByRef.get(ref);
}