@Test
public void checkInitRemoveDocumentFromRegisteredDocumentMenu() {

    verify(registeredDocumentsMenuBuilder,
           times(1)).setRemoveDocumentCommand(removeDocumentCommandCaptor.capture());
    final GuidedDecisionTablePresenter dtPresenter = mock(GuidedDecisionTablePresenter.class);
    doReturn(true).when(presenter).mayClose(eq(dtPresenter));
    doNothing().when(presenter).removeDocument(any(GuidedDecisionTablePresenter.class));
    final ParameterizedCommand<KieDocument> removeDocumentCommand = removeDocumentCommandCaptor.getValue();
    assertNotNull(removeDocumentCommand);
    removeDocumentCommand.execute(dtPresenter);
    verify(presenter,
           times(1)).mayClose(eq(dtPresenter));
    verify(presenter,
           times(1)).removeDocument(eq(dtPresenter));
}