StroomZipRepository { StroomZipOutputStream getStroomZipOutputStream() throws IOException { return getStroomZipOutputStream(null); } StroomZipRepository(final String dir);   StroomZipRepository(final String dir, final String repositoryFormat, final boolean lock, final int lockDeleteAgeMs); StroomZipOutputStream getStroomZipOutputStream(final MetaMap metaMap); @SuppressWarnings(value = "DM_DEFAULT_ENCODING") void addErrorMessage(final StroomZipFile zipFile, final String msg, final boolean bad);  }
@Test public void testInvalidDelimiter() throws IOException { final MetaMap metaMap = new MetaMap(); metaMap.put("feed", "myFeed"); metaMap.put("key1", "myKey1"); final String repositoryFormat = "%{id}_${id}_${FEED}_${kEy1}"; final String repoDir = TestUtil.getCurrentTestPath().toAbsolutePath().toString() + File.separator + "repo3"; final StroomZipRepository stroomZipRepository = new StroomZipRepository(repoDir, repositoryFormat, false, 10000); final StroomZipOutputStreamImpl out1 = (StroomZipOutputStreamImpl) stroomZipRepository.getStroomZipOutputStream(metaMap); StroomZipOutputStreamUtil.addSimpleEntry(out1, new StroomZipEntry(null, "file", StroomZipFileType.Data), "SOME_DATA".getBytes(CharsetConstants.DEFAULT_CHARSET)); Assert.assertFalse(Files.isRegularFile(out1.getFile())); out1.close(); Path zipFile = out1.getFile(); Assert.assertTrue(Files.isRegularFile(zipFile)); final String expectedFilename = "__id__001_myFeed_myKey1.zip"; Assert.assertEquals(expectedFilename, zipFile.getFileName().toString()); }