result.getV1().iterator().next().equals(new MavenArtifact("org.drools:knowledge-api:jar:5.4.0-SNAPSHOT:compile"));
}
@Test
public void testTreeComplex() {
final MavenDependencyTreeParser parser = new MavenDependencyTreeParser();
final String input = "org.drools:drools-camel-server:war:5.4.0-SNAPSHOT\n" +
"+- org.drools:drools-camel:jar:5.4.0-SNAPSHOT:compile\n" +
"| +- org.springframework:spring-aop:jar:2.5.6:compile\n" +
"| \\- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.4.4:compile\n" +
"| +- xml-resolver:xml-resolver:jar:1.2:compile\n" +
"| | +- org.apache.cxf:cxf-tools-common:jar:2.4.4:compile\n" +
"| | \\- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.4.4:compile\n" +
"| +- org.jboss:something:jar:2.4.4:compile\n" +
"+- org.apache.camel:camel-core:jar:2.4.0:compile\n";
final MavenDependencyTreeParser.Pair<Collection<MavenArtifact>, Collection<MavenArtifact>> result;
result = parser.buildDependencyTreeAndList(input);
assertNotNull(result);
assertNotNull(result.getV1());
assertNotNull(result.getV2());
assertEquals(8, result.getV2().size());