### Question:
ProjectPortletUtils { public static List<AttachmentUsage> deselectedAttachmentUsagesFromRequest(ResourceRequest request) { return makeAttachmentUsagesFromRequestParameters(request, Sets::difference); } private  ProjectPortletUtils(); static void updateProjectFromRequest(PortletRequest request, Project project); static String getCommentsByTodoId(PortletRequest request, String id); static ProjectVulnerabilityRating updateProjectVulnerabilityRatingFromRequest(Optional<ProjectVulnerabilityRating> projectVulnerabilityRatings, ResourceRequest request); static Map<String, Set<String>> getSelectedReleaseAndAttachmentIdsFromRequest(ResourceRequest request, boolean withPath); static Map<String, Set<LicenseNameWithText>> getExcludedLicensesPerAttachmentIdFromRequest(Set<String> attachmentContentIdsWithPath,
                                                                                                      ResourceRequest request); static List<AttachmentUsage> makeLicenseInfoAttachmentUsages(Project project,
            Set<String> selectedAttachmentIdsWithPath, Function<String, UsageData> usageDataGenerator); static List<AttachmentUsage> makeAttachmentUsages(Project project,
            Map<String, Set<String>> selectedReleaseAndAttachmentIds, Function<String, UsageData> usageDataGenerator); static Map<Source, Set<String>> extractContainedAttachments(Collection<ProjectLink> projectLinks); static List<AttachmentUsage> deselectedAttachmentUsagesFromRequest(ResourceRequest request); static List<AttachmentUsage> selectedAttachmentUsagesFromRequest(ResourceRequest request);  }### Answer:
@Test public void testMakeAttachmentUsagesToDeleteFromRequest() { Mockito.when(request.getParameter(PROJECT_ID)).thenReturn("p1"); Mockito.when(request.getParameterValues(PROJECT_SELECTED_ATTACHMENT_USAGES)) .thenReturn(new String[]{"r1_licenseInfo_att1", "r4_licenseInfo_att4"}); Mockito.when(request.getParameterValues(PROJECT_SELECTED_ATTACHMENT_USAGES_SHADOWS)) .thenReturn(new String[]{"r1_licenseInfo_att1", "r2_sourcePackage_att2", "r3_manuallySet_att3"}); List<AttachmentUsage> attachmentUsages = ProjectPortletUtils.deselectedAttachmentUsagesFromRequest(request); Assert.assertThat(attachmentUsages, Matchers.containsInAnyOrder( new AttachmentUsage(Source.releaseId("r2"), "att2", Source.projectId("p1")) .setUsageData(UsageData.sourcePackage(new SourcePackageUsage())), new AttachmentUsage(Source.releaseId("r3"), "att3", Source.projectId("p1")) .setUsageData(UsageData.manuallySet(new ManuallySetUsage())) )); }