ErrorPopup { protected void onClose() { view.hide(); } @Inject  ErrorPopup(final View view); @PostConstruct void init(); void showError(final String message); void showError(final String message,
                          final DisplayMode displayMode); void showError(final String message,
                          final String detail); void showError(final String message,
                          final String detail,
                          final DisplayMode displayMode);  }
@Test public void testOnClose() { popup.onClose(); verify(view, times(1)).hide(); }