### Question:
ShortcutSubHeadingLinkPresenter { public void setup(final HomeShortcutLink link) { this.link = link; view.setLabel(link.getLabel()); if (!shortcutHelper.authorize(link.getPerspectiveIdentifier())) { view.disable(); } } @Inject  ShortcutSubHeadingLinkPresenter(final View view,
                                           final ShortcutHelper shortcutHelper); @PostConstruct void init(); void setup(final HomeShortcutLink link); View getView();  }### Answer:
@Test public void setupWithPermissionTest() { doReturn(true).when(shortcutHelper).authorize("perspectiveIdentifier"); presenter.setup(new HomeShortcutLink("label", "perspectiveIdentifier")); verify(view).setLabel("label"); verify(view, never()).disable(); }
@Test public void setupWithoutPermissionTest() { doReturn(false).when(shortcutHelper).authorize("perspectiveIdentifier"); presenter.setup(new HomeShortcutLink("label", "perspectiveIdentifier")); verify(view).setLabel("label"); verify(view).disable(); }