diff --git a/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/runtimeException/ObserverExceptionRethrownTest.java b/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/runtimeException/ObserverExceptionRethrownTest.java index bcd482d585..84bb61def8 100644 --- a/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/runtimeException/ObserverExceptionRethrownTest.java +++ b/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/runtimeException/ObserverExceptionRethrownTest.java @@ -22,6 +22,7 @@ import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.cdi.tck.AbstractTest; import org.jboss.cdi.tck.shrinkwrap.WebArchiveBuilder; +import org.jboss.cdi.tck.tests.event.observer.runtimeException.TeaCupPomeranian.Trigger; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.jboss.test.audit.annotations.SpecAssertion; import org.jboss.test.audit.annotations.SpecVersion; @@ -44,7 +45,7 @@ public static WebArchive createTestArchive() { @Test(expectedExceptions = { TeaCupPomeranian.OversizedException.class }) @SpecAssertion(section = OBSERVER_NOTIFICATION, id = "cd") public void testNonTransactionalObserverThrowsNonCheckedExceptionIsRethrown() { - getCurrentManager().getEvent().select(String.class).fire("string event"); + getCurrentManager().getEvent().select(Trigger.class).fire(new Trigger()); } } diff --git a/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/runtimeException/TeaCupPomeranian.java b/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/runtimeException/TeaCupPomeranian.java index 38e2b21539..76510baca8 100644 --- a/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/runtimeException/TeaCupPomeranian.java +++ b/impl/src/main/java/org/jboss/cdi/tck/tests/event/observer/runtimeException/TeaCupPomeranian.java @@ -26,7 +26,9 @@ public static class OversizedException extends RuntimeException { private static final long serialVersionUID = 1L; } - public void observeSimpleEvent(@Observes String someEvent) { + static class Trigger {}; + + public void observeSimpleEvent(@Observes Trigger someEvent) { throw new OversizedException(); }