@Test
public void testCreateArchiveEntriesPresent() throws Exception {

    archiver.createArchive();
    Map<String, TarArchiveEntry> tarEntries = getTarEntries();
    assertEquals(7, tarEntries.size());
    assertThat(tarEntries.keySet(), hasItems("dir2/", "dir2/test.txt", "dir2/dir3/", "dir2/dir3/test.sh",
            "dir2/testPermissions", "dir2/testLastModified", "dir2/testOwnerAndGroupName"));
    TarArchiveEntry dirArchiveEntry = tarEntries.get("dir2/");
    assertTrue(dirArchiveEntry.isDirectory());
    TarArchiveEntry textFileEntry = tarEntries.get("dir2/test.txt");
    assertTrue(textFileEntry.isFile());
    byte[] content = getTarEntry("dir2/test.txt");
    assertEquals("hello", new String(content, StandardCharsets.UTF_8));
}