public void testRevokeService_NonWrongProvider() {
MockBeanContextServicesSupport support = new MockBeanContextServicesSupport();
MockBeanContextServicesListener l1 = new MockBeanContextServicesListener();
support.addBeanContextServicesListener(l1);
MockBeanContextServiceProvider provider = new MockBeanContextServiceProvider();
support.addService(Collection.class, provider);
support.records.clear();
provider.records.clear();
try {
support.revokeService(Collection.class,
new MockBeanContextServiceProvider(), false);
fail();
} catch (IllegalArgumentException e) {
// expected
}
assertNull(l1.lastRevokedEvent);