public void testFeatureFeature() { a.addDependency(b); a.addDependency(b_B); a.addDependency(b_B_b); a_A.addDependency(b); a_A.addDependency(b_B); a_A.addDependency(b_B_b); a_A_a.addDependency(b); a_A_a.addDependency(b_B); a_A_a.addDependency(b_B_b); Visitor visitor = new LinkMinimizer(); visitor.traverseNodes(factory.getPackages().values()); assertEquals("a outbound", 0, a.getOutboundDependencies().size()); assertEquals("a inbound", 0, a.getInboundDependencies().size()); assertEquals("a_A outbound", 0, a_A.getOutboundDependencies().size()); assertEquals("a_A inbound", 0, a_A.getInboundDependencies().size()); assertEquals("a_A_a outbound", 1, a_A_a.getOutboundDependencies().size()); assertTrue("Missing a.A.a --> b.B.b", a_A_a.getOutboundDependencies().contains(b_B_b)); assertEquals("a_A_a inbound", 0, a_A_a.getInboundDependencies().size()); assertEquals("b outbound", 0, b.getOutboundDependencies().size()); assertEquals("b inbound", 0, b.getInboundDependencies().size()); assertEquals("b_B outbound", 0, b_B.getOutboundDependencies().size()); assertEquals("b_B inbound", 0, b_B.getInboundDependencies().size()); assertEquals("b_B_b outbound", 0, b_B_b.getOutboundDependencies().size()); assertEquals("b_B_b inbound", 1, b_B_b.getInboundDependencies().size()); assertTrue("Missing b.B.b <-- a.A.a", b_B_b.getInboundDependencies().contains(a_A_a)); }