* bundle {a, b->a} and {c->a, d->c->a}, render [d], should render [ab, cd]
*/
@Test
public void testTwoBundlesWithDependencies()
{
HeaderItem bundleAB = Application.get()
.getResourceBundles()
.addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(),
new ResourceReferenceB());
HeaderItem bundleCD = Application.get()
.getResourceBundles()
.addJavaScriptBundle(Application.class, "cd.js", new ResourceReferenceC(),
new ResourceReferenceD());
aggregator.render(forReference(new ResourceReferenceD()));
assertItems(bundleAB, bundleCD);