protected void checkIncomplete(IncompleteDeploymentException e, ObjectName name, Class<? extends Throwable> expected) throws Exception
{
Collection incomplete = e.getMbeansWaitingForDepends();
for (Iterator i = incomplete.iterator(); i.hasNext();)
{
ServiceContext ctx = (ServiceContext) i.next();
if (name.equals(ctx.objectName))
{
Throwable problem = ctx.getProblem();
if (e != null || expected != null)
{
if (expected != null && problem == null)
throw new AssertionFailedError("Did not get expected " + expected.getName() + " for " + ctx);
if (expected == null && problem != null)