context = (CompositeRenderContext) context.getContexts().get(0);
assertEquals(layer, context.getLayer());
Iterator<IRenderContext> children = context.getContexts().iterator();
IRenderContext next = children.next();
assertEquals(layer, next.getLayer());
next = children.next();
assertEquals(layer2, next.getLayer());
next = children.next();
assertEquals(layer3, next.getLayer());
next = children.next();
assertEquals(layer4, next.getLayer());
map.lowerLayer(layer3);
UDIGTestUtil.inDisplayThreadWait(2000, new WaitCondition(){
public boolean isTrue() {
CompositeRenderContext context = (CompositeRenderContext) map.getRenderManagerInternal().getRenderExecutor().getContext();
context = (CompositeRenderContext) context.getContexts().get(0);
return layer3==context.getContexts().get(1).getLayer();
}
}, false);
manager.refresh(null);
context = (CompositeRenderContext) map.getRenderManagerInternal().getRenderExecutor().getContext();
context = (CompositeRenderContext) context.getContexts().get(0);
assertEquals(layer, context.getLayer());
children = context.getContexts().iterator();
next = children.next();
assertEquals(layer, next.getLayer());
next = children.next();
assertEquals(layer3, next.getLayer());
next = children.next();
assertEquals(layer2, next.getLayer());
next = children.next();
assertEquals(layer4, next.getLayer());
}