protected ControllerContext assertScopeBean(String scope, String app, String deployment, int id) throws Throwable
{
ControllerContext context = install(scope, app, deployment, id);
ScopeKey scopeKey = new ScopeKey();
if (app != null)
scopeKey.addScope(CommonLevels.APPLICATION, app);
if (deployment != null)
scopeKey.addScope(CommonLevels.DEPLOYMENT, deployment);
if (id > 0)
scopeKey.addScope(CommonLevels.INSTANCE, "id-" + id);
SearchInfo searchInfo = new ScopeKeySearchInfo(scopeKey);
GraphController gc = (GraphController)getController();
ControllerContext lookup = gc.getContext("bean", null, searchInfo);
assertSame(context, lookup);