@Test
public void testResolveSrcPackageWithResourcesFileInPackage() throws Exception {
final Bean projectServiceBean = (Bean) beanManager.getBeans( ProjectService.class ).iterator().next();
final CreationalContext cc = beanManager.createCreationalContext( projectServiceBean );
final ProjectService projectService = (ProjectService) beanManager.getReference( projectServiceBean,
ProjectService.class,
cc );
final URL rootUrl = this.getClass().getResource( "/ProjectBackendTestProject1/src/main/resources/org/kie/test/project/backend" );
final org.uberfire.java.nio.file.Path nioRootPath = fs.getPath( rootUrl.toURI() );
final Path rootPath = paths.convert( nioRootPath );
final URL testUrl = this.getClass().getResource( "/ProjectBackendTestProject1/src/main/resources/org/kie/test/project/backend/rule1.drl" );
final org.uberfire.java.nio.file.Path nioTestPath = fs.getPath( testUrl.toURI() );
final Path testPath = paths.convert( nioTestPath );
//Test a Resources file resolves to the containing package
final Package result = projectService.resolvePackage( testPath );
assertEquals( rootPath.toURI(),
result.getPackageMainResourcesPath().toURI() );
}