code: public static void assertNodeExist(final Node rootNode, final String relPath) throws RepositoryException {
          try {
              rootNode.getNode(relPath);
          } catch (final PathNotFoundException e) {
              LOG.debug("Node {} does not exist in path {}", relPath, rootNode.getPath(), e);
              fail(e.getMessage());
          }
      }
docs: Asserts that a specific node exists under the root node, where the specific node is specified using its relative
  path
  
  @param rootNode
  the root Node to start the search
  @param relPath
  the relative path of the node that is asserted to exist
  @throws RepositoryException
  if the repository access failed