code: public static void assertNodeExistByPath(final Session session, final String absPath) throws RepositoryException {
          try {
              session.getNode(absPath);
          } catch (final PathNotFoundException e) {
              LOG.debug("Node path {} does not exist", absPath, e);
              fail(e.getMessage());
          }
      }
docs: Asserts that a specific node with the given absolute path exists in the session
  
  @param session
  the session to search for the node
  @param absPath
  the absolute path to look for a node
  @throws RepositoryException
  if the repository access failed