@Test @SpecAssertions({ @SpecAssertion(section = OBSERVER_METHOD_CONFIGURATOR, id = "bg"), @SpecAssertion(section = OBSERVER_METHOD_CONFIGURATOR, id = "bd"), @SpecAssertion(section = OBSERVER_METHOD_CONFIGURATOR, id = "bi") }) public void addQualifiersAndSetPriorityAndChangeToAsync() throws InterruptedException { Set<ObserverMethod<? super Pear>> pearEventObservers = getCurrentManager() .resolveObserverMethods(new Pear(), Any.Literal.INSTANCE, Ripe.RipeLiteral.INSTANCE, Delicious.DeliciousLiteral.INSTANCE); assertEquals(pearEventObservers.size(), 1); assertEquals(pearEventObservers.iterator().next().getPriority(), ObserverMethod.DEFAULT_PRIORITY + 100); assertEquals(pearEventObservers.iterator().next().isAsync(), true); assertEquals(pearEventObservers.iterator().next().getObservedQualifiers(), Stream.of(Ripe.RipeLiteral.INSTANCE, Delicious.DeliciousLiteral.INSTANCE).collect( Collectors.toSet())); BlockingQueue<Pear> queue = new LinkedBlockingQueue<>(); pearEvent.select(Any.Literal.INSTANCE, Ripe.RipeLiteral.INSTANCE, Delicious.DeliciousLiteral.INSTANCE).fireAsync(new Pear()).thenAccept(queue::offer); Pear pear = queue.poll(2, TimeUnit.SECONDS); assertNotNull(pear); assertTrue(FruitObserver.pearObserverNotified.get()); }