SecurityExplorerScreen { @OnClose public void onClose() { rolesExplorer.clear(); groupsExplorer.clear(); usersExplorer.clear(); } @Inject  SecurityExplorerScreen(final View view,
                                  final RolesExplorer rolesExplorer,
                                  final GroupsExplorer groupsExplorer,
                                  final UsersExplorer usersExplorer,
                                  final ErrorPopupPresenter errorPopupPresenter,
                                  final PlaceManager placeManager,
                                  final ClientUserSystemManager userSystemManager,
                                  final ClientSecurityExceptionMessageResolver exceptionMessageResolver); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsWidget getWidget(); @PostConstruct void init(); @OnStartup void onStartup(final PlaceRequest placeRequest); @OnClose void onClose(); static final String SCREEN_ID; static final String ACTIVE_TAB; static final String ROLES_TAB; static final String GROUPS_TAB; static final String USERS_TAB; }
@Test public void testOnClose() { tested.onClose(); verify(usersExplorer, times(1)).clear(); verify(groupsExplorer, times(1)).clear(); verify(rolesExplorer, times(1)).clear(); }