@Test
public void testSubmit() throws Exception {

    Path path = mock(Path.class);
    view.setupUploadWidget(type);
    view.submit(path);
    verify(attachmentFileWidget).submit(eq(path),
                                        eq(SERVLET_URL),
                                        commandCaptor.capture(),
                                        any(Command.class));
    commandCaptor.getValue().execute();
    verify(notificationEvent).fire(any(NotificationEvent.class));
    verify(presenter).onUploadSuccess();
}