public void testEJBDependency() throws Exception
{
Project project = projectFactory.createTempProject();
facetFactory.install(project, EJBFacet_3_1.class);
DependencyFacet dependencyFacet = project.getFacet(DependencyFacet.class);
DependencyBuilder wrongDependency = DependencyBuilder.create("javax.ejb:ejb-api");
DependencyBuilder correctDependency = DependencyBuilder
.create("org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec");
Assert.assertFalse("Dependency " + wrongDependency + " should not have been added",
dependencyFacet.hasEffectiveManagedDependency(wrongDependency));
Assert.assertTrue("Dependency " + correctDependency + " should have been added",
dependencyFacet.hasEffectiveManagedDependency(correctDependency));