CaseRolesPresenter extends AbstractCaseInstancePresenter<CaseRolesPresenter.CaseRolesView> { protected void removeGroupFromRole(final String groupName, final CaseRoleAssignmentSummary caseRoleAssignmentSummary) { caseService.call( (Void) -> { List<String> groups = caseRoleAssignmentSummary.getGroups(); groups.remove(groupName); caseRoleAssignmentSummary.setGroups(groups); filterCaseRoles(); } ).removeGroupFromRole(containerId, caseId, caseRoleAssignmentSummary.getName(), groupName); }  @WorkbenchPartTitle String getTittle(); void filterCaseRoles(); void setCaseRoleActions(CaseRoleItemView caseRole); void setCaseRoleAssignments(CaseRoleItemView caseRole,
                                       final int assignmentsListMaxWidth); void storeRoleAssignments(final CaseRoleAssignmentSummary currentRoleAssignments,
                                     List<String> users,
                                     List<String> groups); static final String SCREEN_ID; static final String CASE_OWNER_ROLE; }
@Test public void testRemoveGroupFromRole() { List<String> assignedGroupsList = new ArrayList<>(); assignedGroupsList.add(GROUP); final CaseRoleAssignmentSummary roleAssignments = CaseRoleAssignmentSummary.builder() .name(CASE_ROLE) .groups(assignedGroupsList) .build(); when(view.getFilterValue()).thenReturn("All"); presenter.removeGroupFromRole(GROUP, roleAssignments); verify(caseManagementService).removeGroupFromRole(anyString(), anyString(), eq(CASE_ROLE), eq(GROUP)); assertTrue(roleAssignments.getGroups().isEmpty()); verify(presenter).filterCaseRoles(); }