### Question:
AttachmentStreamConnector { protected ZipEntry getDeduplicatedZipEntry(String fileName, Map<String, Integer> fileNameUsageMap) { if (fileNameUsageMap.containsKey(fileName)) { return new ZipEntry(printAcceptedZipEntryName(fileName, fileNameUsageMap.get(fileName))); } else { return new ZipEntry(fileName); } } AttachmentStreamConnector(Duration downloadTimeout);  AttachmentStreamConnector(DatabaseConnector connector, Duration downloadTimeout);  AttachmentStreamConnector(DatabaseConnector connector, AttachmentContentDownloader attachmentContentDownloader, Duration downloadTimeout); InputStream getAttachmentStream(AttachmentContent attachment, User user, T context); InputStream unsafeGetAttachmentStream(AttachmentContent attachment); InputStream getAttachmentBundleStream(Set<AttachmentContent> attachments, User user, T context); void uploadAttachment(AttachmentContent attachment, InputStream stream); void uploadAttachmentPart(AttachmentContent attachmentContent, int part, InputStream stream); InputStream getAttachmentPartStream(AttachmentContent attachment, int part);  }### Answer:
@Test public void testGetDeduplicatedZipEntry() { Map<String, Integer> fileNameUsageMap = new HashMap<>(); ZipEntry zipEntry = attachmentStreamConnector.getDeduplicatedZipEntry("source.zip", fileNameUsageMap); assertThat(zipEntry.getName(), is("source.zip")); fileNameUsageMap.put("source.zip", 1); ZipEntry zipEntry2 = attachmentStreamConnector.getDeduplicatedZipEntry("source.zip", fileNameUsageMap); assertThat(zipEntry2.getName(), is("source (1).zip")); }