public static CompressionType getCompressionType() {
        return getCompressionType(System.getenv(VESPA_CONFIG_PROTOCOL_COMPRESSION),
                                  System.getProperty(VESPA_CONFIG_PROTOCOL_COMPRESSION));
    }
@Test
    public void testCompressionType() {
        assertThat(JRTConfigRequestFactory.getCompressionType("", ""), is(CompressionType.LZ4));
        assertThat(JRTConfigRequestFactory.getCompressionType("UNCOMPRESSED", ""), is(CompressionType.UNCOMPRESSED));
        assertThat(JRTConfigRequestFactory.getCompressionType("", "UNCOMPRESSED"), is(CompressionType.UNCOMPRESSED));
        assertThat(JRTConfigRequestFactory.getCompressionType("UNCOMPRESSED", "UNCOMPRESSED"), is(CompressionType.UNCOMPRESSED));

        assertThat(JRTConfigRequestFactory.getCompressionType("", ""), is(CompressionType.LZ4));
        assertThat(JRTConfigRequestFactory.getCompressionType("LZ4", ""), is(CompressionType.LZ4));
        assertThat(JRTConfigRequestFactory.getCompressionType("", "LZ4"), is(CompressionType.LZ4));
        assertThat(JRTConfigRequestFactory.getCompressionType("LZ4", "LZ4"), is(CompressionType.LZ4));

        assertThat(JRTConfigRequestFactory.getCompressionType("UNCOMPRESSED", "LZ4"), is(CompressionType.UNCOMPRESSED));
        assertThat(JRTConfigRequestFactory.getCompressionType("LZ4", "UNCOMPRESSED"), is(CompressionType.LZ4));
    }