AdminPageCategoryPresenter { public void setup(final List<AdminTool> adminTools, final String screen, final String perspectiveIdentifierToGoBackTo) { adminTools.forEach(adminTool -> { final AdminPageItemPresenter itemPresenter = adminPageItemPresenterProvider.get(); itemPresenter.setup(adminTool, screen, perspectiveIdentifierToGoBackTo); view.add(itemPresenter.getView()); }); } @Inject  AdminPageCategoryPresenter(final View view,
                                      final ManagedInstance<AdminPageItemPresenter> adminPageItemPresenterProvider); void setup(final List<AdminTool> adminTools,
                      final String screen,
                      final String perspectiveIdentifierToGoBackTo); View getView();  }
@Test public void setupTest() { List<AdminTool> adminTools = new ArrayList<>(); adminTools.add(mock(AdminTool.class)); adminTools.add(mock(AdminTool.class)); presenter.setup(adminTools, "screen", null); verify(adminPageItemPresenterProvider, times(2)).get(); verify(view, times(2)).add(any()); }