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