code: public ValidationResult validate(String pid) {
          if (pid == null) {
              throw new NullPointerException("pid may not be null.");
          }
  
          ObjectInfo object = null;
  
          try {
              object = objectSource.getValidationObject(pid);
          } catch (ObjectSourceException e) {
              // This falls into the case of object==null.
          }
  
          if (object == null) {
              ValidationResult result =
                      new ValidationResult(new BasicObjectInfo(pid));
              result.addNote(ValidationResultNotation.objectNotFound(pid));
              return result;
          } else {
              return validate(object);
          }
      }
docs: If we only have a PID, we can get the object from the
  {@link ObjectSource}. But if that fails, we need to mock up an object
  for the result.