ErrorPopup { public void showError(final String message) { showError(message, DisplayMode.PATTERN_FLY); } @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 testShowError() { popup.showError(MESSAGE); verify(popup, times(1)).showError(MESSAGE, ErrorPopup.DisplayMode.PATTERN_FLY); }
@Test public void testShowErrorWithDetail() { popup.showError(MESSAGE, DETAIL); verify(popup, times(1)).showError(MESSAGE, DETAIL, ErrorPopup.DisplayMode.PATTERN_FLY); }