DependenciesBuilder { public Dependencies build() { return dependencies; } DependenciesBuilder(Element spec); Dependencies build();  }
@Test public void testBuildDependencies() { DependenciesBuilder dependenciesBuilder = new DependenciesBuilder(parse( "<searcher provides='symbol1 symbol2 ' before='p1' after=' s1' >", " <provides> symbol3 </provides>", " <provides> symbol4 </provides>", " <before> p2 </before>", " <after>s2</after>", "</searcher>")); Dependencies dependencies = dependenciesBuilder.build(); assertEquals(dependencies.provides(), set("symbol1,symbol2,symbol3,symbol4")); assertEquals(dependencies.before(), set("p1,p2")); assertEquals(dependencies.after(), set("s1,s2")); }