dto.setNewlyAddedGroupIds(Arrays.asList(1L, 2L));
dto.setRemovedGroupIds(Arrays.asList(1L, 2L));
when(permissionManager.findBranchPermissionByMask(targetPermission.getMask())).thenReturn(targetPermission);
JsonResponse response = administrationController.editBranchPermissions(dto);
assertEquals(response.getStatus(), JsonResponseStatus.SUCCESS);
verify(branchService).changeBranchPermissions(anyLong(),
eq(dto.getBranchId()), eq(dto.isAllowed()), any(PermissionChanges.class));
}