Map<String, WebFragment> jarURLWebFragmentMap = new LinkedHashMap<String, WebFragment>();
jarURLWebFragmentMap.put("WEB-INF/lib/testA.jar", loadXmlObject("webfragments/absolute/webfragmentA.xml", WebFragment.class));
jarURLWebFragmentMap.put("WEB-INF/lib/testB.jar", loadXmlObject("webfragments/absolute/webfragmentB.xml", WebFragment.class));
jarURLWebFragmentMap.put("WEB-INF/lib/testC.jar", loadXmlObject("webfragments/absolute/webfragmentC.xml", WebFragment.class));
jarURLWebFragmentMap.put("WEB-INF/lib/testD.jar", loadXmlObject("webfragments/absolute/webfragmentD.xml", WebFragment.class));
WebApp webApp = loadXmlObject("webfragments/absolute/web-withoutothers.xml", WebApp.class);
EARContext rootContext = new DummyEARContext();
WebFragmentEntry[] webFragmentEntries = MergeHelper.sortWebFragments(rootContext, createDummyWebModule(rootContext), null, webApp, jarURLWebFragmentMap);
Assert.assertEquals(2, webFragmentEntries.length);
Assert.assertEquals("webfragmentD", webFragmentEntries[0].getName());
Assert.assertEquals("webfragmentA", webFragmentEntries[1].getName());