@@ -0,0 +1,2162 @@
+package acceptance;%0A%0Aimport com.google.common.io.ByteStreams;%0Aimport org.apache.commons.compress.archivers.tar.TarArchiveEntry;%0Aimport org.apache.commons.compress.archivers.tar.TarArchiveInputStream;%0Aimport org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;%0Aimport org.hamcrest.Matchers;%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.TemporaryFolder;%0A%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport static io.digdag.cli.Main.main;%0Aimport static org.hamcrest.Matchers.hasKey;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class InitAndArchiveIT %7B%0A    @Rule%0A    public TemporaryFolder folder = new TemporaryFolder();%0A%0A    private Path project;%0A    private Path archive;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        project = folder.getRoot().toPath().resolve(%22foobar%22);%0A        archive = folder.getRoot().toPath().resolve(%22digdag.tar.gz%22);%0A    %7D%0A%0A    @Test%0A    public void archive() throws Exception %7B%0A        main(%22init%22, project.toString());%0A        main(%22archive%22,%0A                %22-f%22, project.resolve(%22digdag.yml%22).toString(),%0A                %22-o%22, archive.toString());%0A%0A        assertThat(Files.exists(archive), is(true));%0A%0A        Map%3CString, byte%5B%5D%3E entries = readEntries();%0A%0A        // TODO (dano): add more exhaustive verification of archive contents%0A        assertThat(entries, hasKey(%22digdag.yml%22));%0A        assertThat(entries, hasKey(%22foobar.yml%22));%0A    %7D%0A%0A    private Map%3CString, byte%5B%5D%3E readEntries() throws IOException %7B%0A        Map%3CString, byte%5B%5D%3E entries = new HashMap%3C%3E();%0A        try (TarArchiveInputStream s = new TarArchiveInputStream(%0A                new GzipCompressorInputStream(Files.newInputStream(archive)))) %7B%0A            while (true) %7B%0A                TarArchiveEntry entry = s.getNextTarEntry();%0A                if (entry == null) %7B%0A                    break;%0A                %7D%0A                entries.put(entry.getName(), ByteStreams.toByteArray(s));%0A            %7D%0A        %7D%0A        return entries;%0A    %7D%0A%7D%0A

add breaking test