### Question:
KnowledgeSessionsModal extends Elemental2Modal<KnowledgeSessionsModal.View> { public void done() { knowledgeBasesListPresenter.getPresenters().forEach(KnowledgeSessionListItemPresenter::closeAllExpandableListItems); hide(); } @Inject  KnowledgeSessionsModal(final View view,
                                  final KnowledgeBasesListPresenter knowledgeBasesListPresenter); void setup(final KnowledgeBaseItemPresenter parentPresenter); @Override void setWidth(final String width); KBaseModel getObject(); void add(); void signalKnowledgeBaseAddedOrRemoved(); void fireChangeEvent(); void done();  }### Answer:
@Test public void testDone() { final KnowledgeSessionListItemPresenter mock1 = mock(KnowledgeSessionListItemPresenter.class); final KnowledgeSessionListItemPresenter mock2 = mock(KnowledgeSessionListItemPresenter.class); doReturn(Arrays.asList(mock1, mock2)).when(knowledgeBasesListPresenter).getPresenters(); doNothing().when(knowledgeSessionsModal).hide(); knowledgeSessionsModal.done(); verify(mock1).closeAllExpandableListItems(); verify(mock2).closeAllExpandableListItems(); verify(knowledgeSessionsModal).hide(); }