@Test
public void testOnSubmitComplete() throws Exception {

    when(view.getFileName()).thenReturn("ff");
    presenter.onSubmitComplete("OK");
    assertEquals("ff", presenter.value);
    verify(view, times(0)).addHelpContent(anyString(), anyString(), any(Placement.class));
    verify(view, times(0)).init(presenter);
    verify(view, times(0)).setFileUploadName(anyString());
    verify(view, times(1)).setFileUploadVisible(true);
    verify(view, times(0)).setFileLabelText(anyString());
    verify(view, times(0)).setFileLabelVisible(anyBoolean());
    verify(view, times(1)).setLoadingImageVisible(false);
    verify(view, times(1)).getFileName();
    verify(view, times(0)).setFormAction(anyString());
    verify(view, times(0)).submit();
    verify(view, times(0)).showError(any(SafeHtml.class));
    verify(view, times(2)).clearError();
    verify( workbenchNotificationEvent, times( 1 ) ).fire(any(NotificationEvent.class));
    verify( valueChangeEvent, times( 1 ) ).fire(any(ValueChangeEvent.class));
}