@Test
public void guessScheme() {

    // It would be nice to have parameterized tests :)
    String[][] data = new String[][] {
            { "Simple ZIP", "foobar.zip", "zip" },
            { "Inner ZIP extension", "foobar.zip.foo", "zip" },
            { "Case insensitive ZIP", "foobar.ZIP", "zip" },
            { "Compressed TAR, separate extension", "foobar.tar.gz", "tar" },
            { "Compressed TAR, combined extension", "foobar.tgz", "tar" },
            { "Dot-dot", "foobar.zip..foo", "zip" },
            { "Ignore file name", "zip.foo", "unknown" },
            { "Ignore path", "foo.zip/bar.foo", "unknown" },
    };
    for (String[] testCase : data) {
        assertThat(LegacyUtilities.guessScheme(testCase[1])).named(testCase[0]).isEqualTo(testCase[2]);
    }
}