class CompressionUtil {

    public static boolean isAlgorithmSupported(String algorithm) {
        return (Algorithm.findByName(algorithm) != null);
    }

}

class CompressionUtilTest {

    private static final String TEST_FILE;

    @Test
    public void isAlgorithmSupported() throws Exception {

        Assert.assertEquals(true, CompressionUtil.isAlgorithmSupported("gzip"));
        Assert.assertEquals(true, CompressionUtil.isAlgorithmSupported("zip"));
        Assert.assertEquals(false, CompressionUtil.isAlgorithmSupported("gzip2"));
        //Assert.assertEquals(true, CompressionUtil.isAlgorithmSupported("lzma"));
    }

}