[Demonstration 1]

[Buggy Method]
@BeforeExam
public void beforeAllianceTest() throws Exception {
    try {
        basePort = getBasePort();
        getAdminConfig().setLogLevels();
        getServiceManager().waitForRequiredApps(REQUIRED_APPS);
        getServiceManager().waitForAllBundles();
        getCatalogBundle().waitForCatalogProvider();
    } catch (Exception e) {
        LOGGER.error("Failed in @BeforeExam: ", e);
        fail("Failed in @BeforeExam: " + e.getMessage());
    }
}

[Buggy Hunk]
getServiceManager().waitForRequiredApps(REQUIRED_APPS);

[Patch]
getServiceManager().waitForRequiredApps(getDefaultRequiredApps());