ValidationExecutor { public static @NotNull String filePathToNodePath(@NotNull Path filePath) { String platformPath = FilenameUtils.separatorsToUnix(filePath.toString()); String repositoryPath = PlatformNameFormat.getRepositoryPath(platformPath, true); if (!repositoryPath.isEmpty()) { repositoryPath = "/" + repositoryPath; } return repositoryPath; } ValidationExecutor(@NotNull Map<String, Validator> validatorsById); @NotNull Map<String, Validator> getAllValidatorsById(); @NotNull Map<String, Validator> getUnusedValidatorsById(); @NotNull Collection<ValidationViolation> validateMetaInf(@Nullable InputStream input, @NotNull Path filePath, @NotNull Path basePath); @NotNull Collection<ValidationViolation> validateJcrRoot(@Nullable InputStream input, @NotNull Path filePath, @NotNull Path basePath); @NotNull Collection<ValidationViolation> done(); static @NotNull String filePathToNodePath(@NotNull Path filePath);  }
@Test public void testFilePathToNodePath() { Assert.assertEquals("/apps/test", ValidationExecutor.filePathToNodePath(Paths.get("apps", "test"))); Assert.assertEquals("/some/other/path", ValidationExecutor.filePathToNodePath(Paths.get("some", "other", "path"))); }