caught = ex;
}
h.check(caught instanceof IllegalArgumentException);
// Check #3: De-registered all SomeServices.
registry.deregisterAll(SomeService.class);
h.check(!registry.contains(s1));
// Check #4: Did not de-register TestService.
h.check(registry.contains(s2) && s2.numRegistrations == 1);
}