ClientBehaviorResolver { @Deprecated public static AjaxBehavior resolveActiveAjaxBehavior(final UIComponentBase component, final String event) { return findAjaxBehavior(component.getClientBehaviors(), event); }  static Optional<AjaxBehavior> findFirstActiveAjaxBehavior(final UIComponentBase component, final String eventName); @Deprecated static AjaxBehavior resolveActiveAjaxBehavior(final UIComponentBase component, final String event);  }
@Test void testResolveActiveAjaxBehavior() { assertThat(ClientBehaviorResolver.findFirstActiveAjaxBehavior(componentMock, existingEvent)).isPresent(); assertThat(ClientBehaviorResolver.findFirstActiveAjaxBehavior(componentMock, notExistingEvent)).isNotPresent(); assertThat(ClientBehaviorResolver.findFirstActiveAjaxBehavior(componentMock, existingButNotActiveEvent)).isNotPresent(); }