@Test
void testInvalidDelimiter() throws IOException {

    final AttributeMap attributeMap = new AttributeMap();
    attributeMap.put("feed", "myFeed");
    attributeMap.put("key1", "myKey1");
    final String repositoryFormat = "%{id}_${id}_${FEED}_${kEy1}";
    final String repoDir = FileUtil.getCanonicalPath(Files.createTempDirectory("stroom").resolve("repo3"));
    final StroomZipRepository stroomZipRepository = new StroomZipRepository(repoDir, repositoryFormat, false, 10000, 0, false);
    StroomZipOutputStreamImpl out1;
    try (final StroomZipOutputStreamImpl out = (StroomZipOutputStreamImpl) stroomZipRepository.getStroomZipOutputStream(attributeMap)) {
        StroomZipOutputStreamUtil.addSimpleEntry(out, new StroomZipEntry(null, "file", StroomZipFileType.Data),
                "SOME_DATA".getBytes(CharsetConstants.DEFAULT_CHARSET));
        assertThat(Files.isRegularFile(out.getFile())).isFalse();
        out1 = out;
    }
    Path zipFile = out1.getFile();
    assertThat(Files.isRegularFile(zipFile)).isTrue();
    final String expectedFilename = "__id__001_myFeed_myKey1.zip";
    assertThat(zipFile.getFileName().toString()).isEqualTo(expectedFilename);
}