@Test public void detachNoScope() { // given prepAttach(); ui.attach(); // when ui.detach(); // then // no exception }
@Test public void detachScopeNotNull() { // given prepAttach(); ui.attach(); ui.setScope(uiScope); ui.setInstanceKey(uiKey); // when ui.detach(); // then verify(uiScope).releaseScope(ui.getInstanceKey()); verify(broadcaster).unregister(Broadcaster.ALL_MESSAGES, ui); }