code: @Nonnull
      public static Path getApprovalPath(Path filePath) {
          Pre.notNull(filePath, "filePath");
  
          String s = filePath.toString();
          int extensionIndex = s.lastIndexOf('.');
  
          if (extensionIndex == -1) {
              return Paths.get(s + FOR_APPROVAL_EXTENSION);
          }
  
          int lastPartOfPath = s.lastIndexOf('/');
          if (lastPartOfPath != -1 && lastPartOfPath > extensionIndex) {
              //there was no extension and the directory contains dots.
              return Paths.get(s + FOR_APPROVAL_EXTENSION);
          }
  
          String firstPart = s.substring(0, extensionIndex);
          String extension = s.substring(extensionIndex);
  
          return Paths.get(firstPart + FOR_APPROVAL_EXTENSION + extension);
  
      }
docs: Get the path for approval from the original file path.
  
  @param filePath the original path to value
  @return the path for approval