Thread.sleep(StsTestUtil.WAIT_TIME);
cEditor.setActivePage(page.getId());
assertNotNull("Could not load overview page.", page.getMasterPart());
IDOMDocument document = cEditor.getDomDocument();
CMDocumentCache cache = ModelQueryUtil.getCMDocumentCache(document);
final String siUri = ConfigCoreUtils.getSelectedSchemaLocation(document, IntegrationSchemaConstants.URI);
final String siJmsUri = ConfigCoreUtils.getSelectedSchemaLocation(document, IntJmsSchemaConstants.URI);
final String siStreamUri = ConfigCoreUtils.getSelectedSchemaLocation(document, IntStreamSchemaConstants.URI);
final CountDownLatch latch = new CountDownLatch(3);
if (cache.getStatus(siUri) == CMDocumentCache.STATUS_LOADED) {
latch.countDown();
}
if (cache.getStatus(siJmsUri) == CMDocumentCache.STATUS_LOADED) {
latch.countDown();
}
if (cache.getStatus(siStreamUri) == CMDocumentCache.STATUS_LOADED) {
latch.countDown();
}
cache.addListener(new CMDocumentCacheListener() {
public void cacheUpdated(CMDocumentCache cache, String uri, int oldStatus, int newStatus,
CMDocument cmDocument) {
if (newStatus == CMDocumentCache.STATUS_LOADED && oldStatus != CMDocumentCache.STATUS_LOADED) {
if (uri.equals(siUri) || uri.equals(siJmsUri) || uri.equals(siStreamUri)) {