Buggy code:
@ RunWith ( PaxExam . class ) public class WarJsfResourcehandlerIntegrationTest extends ITestBase { private Option [ ] configureMyfacesWithSamples ( ) { } @ Configuration public Option [ ] config ( ) { } @ Test public void testServiceOverride ( ) throws Exception { } @ Test @ Ignore ( "[PAXWEB-929]<seq2seq4repair_space>should<seq2seq4repair_space>fix<seq2seq4repair_space>this" ) public void testJsfResourceHandler ( ) throws Exception { initWebListener ( ) ; installAndStartBundle ( mavenBundle ( ) . groupId ( "org.ops4j.pax.web.samples" ) . artifactId ( "jsf-resourcehandler-myfaces" ) . versionAsInProject ( ) . getURL ( ) ) ; waitForWebListener ( ) ; <START_BUG> new org . ops4j . pax . web . itest . base . WaitCondition ( "webresources-extender<seq2seq4repair_space>done" ) { <END_BUG> @ Override protected boolean isFulfilled ( ) throws Exception { try { String resp = testClient . testWebPath ( "http:////127.0.0.1:8282//osgi-resourcehandler-myfaces//javax.faces.resource//images//iceland.jpg2.xhtml?type=osgi&ln=default&lv=2_0" , 200 ) ; return resp != null ; } catch ( AssertionError e ) { return false ; } } } . waitForCondition ( ) ; final String pageUrl = "http:////127.0.0.1:8282//osgi-resourcehandler-myfaces//index.xhtml" ; final String imageUrl = "http:////127.0.0.1:8282//osgi-resourcehandler-myfaces//javax.faces.resource//images//iceland.jpg.xhtml?type=osgi&ln=default&lv=2_0" ; BundleMatchers . isBundleActive ( "org.ops4j.pax.web.pax-web-resources-extender" , bundleContext ) ; BundleMatchers . isBundleActive ( "org.ops4j.pax.web.pax-web-resources-jsf" , bundleContext ) ; BundleMatchers . isBundleActive ( "jsf-resourcehandler-resourcebundle" , bundleContext ) ; BundleMatchers . isBundleActive ( "jsf-resourcehandler-myfaces" , bundleContext ) ; HttpTestClientFactory . createHttpComponentsTestClient ( ) . prepareResponseAssertion ( "Some<seq2seq4repair_space>Content<seq2seq4repair_space>shall<seq2seq4repair_space>be<seq2seq4repair_space>included<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>jsf-application-bundle<seq2seq4repair_space>to<seq2seq4repair_space>test<seq2seq4repair_space>internal<seq2seq4repair_space>view-resources" , ( resp ) -> StringUtils . contains ( resp , "Hello<seq2seq4repair_space>Included<seq2seq4repair_space>Content" ) ) . prepareResponseAssertion ( "Standard<seq2seq4repair_space>header<seq2seq4repair_space>shall<seq2seq4repair_space>be<seq2seq4repair_space>loaded<seq2seq4repair_space>from<seq2seq4repair_space>resourcebundle<seq2seq4repair_space>to<seq2seq4repair_space>test<seq2seq4repair_space>external<seq2seq4repair_space>view-resources" , ( resp ) -> StringUtils . contains ( resp , "Standard<seq2seq4repair_space>Header" ) ) . prepareResponseAssertion ( "Images<seq2seq4repair_space>shall<seq2seq4repair_space>be<seq2seq4repair_space>loaded<seq2seq4repair_space>from<seq2seq4repair_space>resourcebundle<seq2seq4repair_space>to<seq2seq4repair_space>test<seq2seq4repair_space>external<seq2seq4repair_space>resources" , ( resp ) -> StringUtils . contains ( resp , "iceland.jpg" ) ) . prepareResponseAssertion ( "Customized<seq2seq4repair_space>footer<seq2seq4repair_space>shall<seq2seq4repair_space>be<seq2seq4repair_space>loaded<seq2seq4repair_space>from<seq2seq4repair_space>resourcebundle<seq2seq4repair_space>to<seq2seq4repair_space>test<seq2seq4repair_space>external<seq2seq4repair_space>view-resources" , ( resp ) -> StringUtils . contains ( resp , "Customized<seq2seq4repair_space>Footer" ) ) . prepareResponseAssertion ( "Image-URL<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>created<seq2seq4repair_space>from<seq2seq4repair_space>OsgiResource" , ( resp ) -> StringUtils . contains ( resp , "//osgi-resourcehandler-myfaces//javax.faces.resource//images//iceland.jpg.xhtml?type=osgi&amp;ln=default&amp;lv=2_0" ) ) . prepareResponseAssertion ( "Flag-URL<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>served<seq2seq4repair_space>from<seq2seq4repair_space>iceland-folder" , ( resp ) -> StringUtils . contains ( resp , "//osgi-resourcehandler-myfaces//javax.faces.resource//flag.png.xhtml?type=osgi&amp;loc=germany&amp;ln=layout" ) ) . executeTest ( pageUrl ) ; HttpTestClientFactory . createHttpComponentsTestClient ( ) . addRequestHeader ( "Accept-Language" , "de" ) . withReturnCode ( SC_OK ) . prepareResponseAssertion ( "Flag-URL<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>served<seq2seq4repair_space>from<seq2seq4repair_space>germany-folder" , ( resp ) -> StringUtils . contains ( resp , "//osgi-resourcehandler-myfaces//javax.faces.resource//flag.png.xhtml?type=osgi&amp;loc=germany&amp;ln=layout" ) ) . executeTest ( pageUrl ) ; HttpTestClientFactory . createHttpComponentsTestClient ( ) . executeTest ( imageUrl ) ; String bundlePath = mavenBundle ( ) . groupId ( "org.ops4j.pax.web.samples" ) . artifactId ( "jsf-resourcehandler-resourcebundle-override" ) . versionAsInProject ( ) . getURL ( ) ; Bundle installedResourceBundle = installAndStartBundle ( bundlePath ) ; BundleMatchers . isBundleActive ( installedResourceBundle . getSymbolicName ( ) , bundleContext ) ; HttpTestClientFactory . createHttpComponentsTestClient ( ) . prepareResponseAssertion ( "Overriden<seq2seq4repair_space>footer<seq2seq4repair_space>shall<seq2seq4repair_space>be<seq2seq4repair_space>loaded<seq2seq4repair_space>from<seq2seq4repair_space>resourcebundle-override<seq2seq4repair_space>to<seq2seq4repair_space>test<seq2seq4repair_space>external<seq2seq4repair_space>view-resources<seq2seq4repair_space>which<seq2seq4repair_space>are<seq2seq4repair_space>overriden" , ( resp ) -> StringUtils . contains ( resp , "Overriden<seq2seq4repair_space>Footer" ) ) . prepareResponseAssertion ( "Iceland-Picture<seq2seq4repair_space>shall<seq2seq4repair_space>be<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>version<seq2seq4repair_space>3.0<seq2seq4repair_space>from<seq2seq4repair_space>resourcebunde-override" , ( resp ) -> StringUtils . contains ( resp , "javax.faces.resource//images//iceland.jpg.xhtml?type=osgi&amp;ln=default&amp;lv=2_0&amp;rv=3_0.jpg" ) ) . executeTest ( pageUrl ) ; installedResourceBundle . stop ( ) ; Thread . sleep ( 1000 ) ; HttpTestClientFactory . createHttpComponentsTestClient ( ) . prepareResponseAssertion ( "Customized<seq2seq4repair_space>footer<seq2seq4repair_space>shall<seq2seq4repair_space>be<seq2seq4repair_space>loaded<seq2seq4repair_space>from<seq2seq4repair_space>resourcebundle" , ( resp ) -> StringUtils . contains ( resp , "Customized<seq2seq4repair_space>Footer" ) ) . executeTest ( pageUrl ) ; ZonedDateTime now = ZonedDateTime . of ( LocalDateTime . now ( ) , ZoneId . of ( ZoneId . SHORT_IDS . get ( "ECT" ) ) ) ; HttpTestClientFactory . createHttpComponentsTestClient ( ) . withReturnCode ( SC_NOT_MODIFIED ) . addRequestHeader ( IF_MODIFIED_SINCE , now . format ( DateTimeFormatter . RFC_1123_DATE_TIME ) ) . executeTest ( imageUrl ) ; final String pageUrlWithPrefixMapping = "http:////127.0.0.1:8282//osgi-resourcehandler-myfaces//faces//index.xhtml" ; final String imageUrlWithPrefixMapping = "http:////127.0.0.1:8282//osgi-resourcehandler-myfaces//faces//javax.faces.resource//images//iceland.jpg?type=osgi&ln=default&lv=2_0" ; HttpTestClientFactory . createHttpComponentsTestClient ( ) . executeTest ( imageUrlWithPrefixMapping ) ; HttpTestClientFactory . createHttpComponentsTestClient ( ) . prepareResponseAssertion ( "Image-URL<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>created<seq2seq4repair_space>from<seq2seq4repair_space>OsgiResource.<seq2seq4repair_space>This<seq2seq4repair_space>time<seq2seq4repair_space>the<seq2seq4repair_space>second<seq2seq4repair_space>servlet-mapping<seq2seq4repair_space>(faces//*)<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>used." , ( resp ) -> StringUtils . contains ( resp , "//osgi-resourcehandler-myfaces//faces//javax.faces.resource//images//iceland.jpg?type=osgi&amp;ln=default&amp;lv=2_0" ) ) . executeTest ( pageUrlWithPrefixMapping ) ; } @ Test ( expected = IOException . class ) public void testResourceUnavailble ( ) throws Exception { } private class OsgiResourceLocatorForTest implements OsgiResourceLocator { private ResourceInfo resource ; OsgiResourceLocatorForTest ( ) { } @ Override public void register ( Bundle bundle ) { } @ Override public void unregister ( Bundle bundle ) { } @ Override public ResourceInfo locateResource ( String resourceName ) { } @ Override public < R extends ResourceQueryResult , Q extends ResourceQueryMatcher > Collection < R > findResources ( Q queryMatcher ) { } } No newline ; at end ; of file ; }

Fix:
new org . ops4j . pax . web . itest . base . WaitCondition ( "webresources-extender<seq2seq4repair_space>done" , 30000 ) {