assertTrue(event.isCurrentServiceInvalidNow());
}
public void testGetSourceAsBeanContextServices() {
BeanContextServices services = new MockBeanContextServices();
BeanContextServiceRevokedEvent event = new MockBeanContextServiceRevokedEvent(
services, BeanContext.class, true);
assertSame(services, event.getSource());
assertSame(services, event.getSourceAsBeanContextServices());
// Regression for HARMONY-1153
BeanContextServicesSupport sup = new BeanContextServicesSupport(
new MockBeanContextServices(), new Locale("ru", "RU"), false,
false);
event = new BeanContextServiceRevokedEvent(sup,
MockBeanContextServices.class, false);
assertNotNull(event.getSourceAsBeanContextServices());
// Regression for HARMONY-2506
BeanContextServiceRevokedEvent obj = new BeanContextServiceRevokedEvent(
new testBeanContextServices(), Integer.class, true);
obj.setPropagatedFrom(new testBeanContext());
assertNotNull(obj.getSourceAsBeanContextServices());
}