@Test public void testOnClosedByKeyboard() { final Consumer consumer = mock(Consumer.class); final Optional opt = Optional.of(consumer); doReturn(opt).when(view).getClosedByKeyboardCallback(); view.onClosedByKeyboard(); verify(consumer).accept(view); }
public void onClosedByKeyboard() { getClosedByKeyboardCallback().ifPresent(c -> c.accept(this)); }
AbstractPopoverViewImpl implements PopoverView { public void onClosedByKeyboard() { getClosedByKeyboardCallback().ifPresent(c -> c.accept(this)); } }
AbstractPopoverViewImpl implements PopoverView { public void onClosedByKeyboard() { getClosedByKeyboardCallback().ifPresent(c -> c.accept(this)); } protected  AbstractPopoverViewImpl();  AbstractPopoverViewImpl(final Div popoverElement,
                                   final Div popoverContentElement,
                                   final JQueryProducer.JQuery<Popover> jQueryPopover); }
AbstractPopoverViewImpl implements PopoverView { public void onClosedByKeyboard() { getClosedByKeyboardCallback().ifPresent(c -> c.accept(this)); } protected  AbstractPopoverViewImpl();  AbstractPopoverViewImpl(final Div popoverElement,
                                   final Div popoverContentElement,
                                   final JQueryProducer.JQuery<Popover> jQueryPopover); @Override void setOnClosedByKeyboardCallback(final Consumer<CanBeClosedByKeyboard> callback); @Override void show(final Optional<String> popoverTitle); @Override void hide(); boolean isVisible(); void keyDownEventListener(final Object event); boolean isEscapeKeyPressed(final KeyboardEvent event); boolean isEnterKeyPressed(final KeyboardEvent event); void onClosedByKeyboard(); Optional<Consumer<CanBeClosedByKeyboard>> getClosedByKeyboardCallback(); }
AbstractPopoverViewImpl implements PopoverView { public void onClosedByKeyboard() { getClosedByKeyboardCallback().ifPresent(c -> c.accept(this)); } protected  AbstractPopoverViewImpl();  AbstractPopoverViewImpl(final Div popoverElement,
                                   final Div popoverContentElement,
                                   final JQueryProducer.JQuery<Popover> jQueryPopover); @Override void setOnClosedByKeyboardCallback(final Consumer<CanBeClosedByKeyboard> callback); @Override void show(final Optional<String> popoverTitle); @Override void hide(); boolean isVisible(); void keyDownEventListener(final Object event); boolean isEscapeKeyPressed(final KeyboardEvent event); boolean isEnterKeyPressed(final KeyboardEvent event); void onClosedByKeyboard(); Optional<Consumer<CanBeClosedByKeyboard>> getClosedByKeyboardCallback();  }