public static List<CompressionType> getCompressionTypesFromAcceptedList(List<Byte> acceptedCompressionTypes) {
        if (acceptedCompressionTypes == null || acceptedCompressionTypes.isEmpty()) {
            return Collections.emptyList();
        }

        List<CompressionType> result = new ArrayList<>();
        for (Byte compressionByte : acceptedCompressionTypes) {
            int compressionId = compressionByte.intValue();
            try {
                CompressionType compressionType = CompressionType.forId(compressionId);
                result.add(compressionType);
            } catch (IllegalArgumentException e) {
                log.warn("Accepted compressionByte type with ID {} is not a known compressionByte type; ignoring", compressionId, e);
            }
        }
        return result;
    }
@Test
    public void testGetCompressionTypesFromAcceptedList() {
        assertEquals(0, ClientTelemetryUtils.getCompressionTypesFromAcceptedList(null).size());
        assertEquals(0, ClientTelemetryUtils.getCompressionTypesFromAcceptedList(Collections.emptyList()).size());

        List<Byte> compressionTypes = new ArrayList<>();
        compressionTypes.add(CompressionType.GZIP.id);
        compressionTypes.add(CompressionType.LZ4.id);
        compressionTypes.add(CompressionType.SNAPPY.id);
        compressionTypes.add(CompressionType.ZSTD.id);
        compressionTypes.add(CompressionType.NONE.id);
        compressionTypes.add((byte) -1);

        // should take the first compression type
        assertEquals(5, ClientTelemetryUtils.getCompressionTypesFromAcceptedList(compressionTypes).size());
    }