### Question:
MapExtractor implements TextMap { @Override public void put(String key, String value) { throw new UnsupportedOperationException("The iterator() method should only be used with Tracer.extract()"); } MapExtractor(MetaData metaData); @Override Iterator<Map.Entry<String, String>> iterator(); @Override void put(String key, String value);  }### Answer:
@Test void testMapExtractorPut_throwsUnsupportedOperationException() { MetaData metaData = MetaData.emptyInstance(); metaData = metaData.and("key", "value"); MapExtractor extractor = new MapExtractor(metaData); Assertions.assertThrows(UnsupportedOperationException.class, () -> extractor.put("key1", "value1")); }