class ImportProjectValidator {

    protected POM getPom(POMService pomService,
                         Path rootPath) {

        String rootPathUri = rootPath.toURI();
        String pomUri = POM_XML;

        if (!rootPathUri.endsWith("/")) {
            pomUri = "/" + pomUri;
        }

        Path pomPath = PathFactory.newPath(POM_XML,
                                           rootPathUri + pomUri);
        return pomService.load(pomPath);
    }

}