@Override
    public List<MeasurementOption> decode(ArrayNode json,
            CodecContext context) {
        if (json == null) {
            return null;
        }
        List<MeasurementOption> moList = new ArrayList<>();
        json.forEach(node -> moList.add(MeasurementOption.valueOf(node.asText())));
        return moList;
    }
@Test
    public void testDecodeArrayNodeCodecContext()
            throws JsonProcessingException, IOException {
        String moStr = "{\"measurementsEnabled\": " +
                "[\"FRAME_DELAY_RANGE_BACKWARD_AVERAGE\", " +
                "\"INTER_FRAME_DELAY_VARIATION_FORWARD_AVERAGE\"]}";
        InputStream input = new ByteArrayInputStream(
                moStr.getBytes(StandardCharsets.UTF_8));
        JsonNode cfg = mapper.readTree(input);
        Iterable<MeasurementOption> moIter = context
                .codec(MeasurementOption.class)
                .decode((ArrayNode) cfg.get("measurementsEnabled"), context);

        Iterator<MeasurementOption> source = moIter.iterator();
        List<MeasurementOption> moList = new ArrayList<>();
        source.forEachRemaining(moList::add);

        assertEquals(MeasurementOption.FRAME_DELAY_RANGE_BACKWARD_AVERAGE.toString(),
                moList.get(0).name());
        assertEquals(MeasurementOption.INTER_FRAME_DELAY_VARIATION_FORWARD_AVERAGE.toString(),
                moList.get(1).name());
    }