### Question:
JmxValueFunctions { public static Function<CompositeData,Map> compositeDataToMap() { return new CompositeDataToMap(); }  static Function<TabularData, Map> tabularDataToMap(); static Function<TabularData, Map> tabularDataToMapOfMaps(); static Function<CompositeData,Map> compositeDataToMap(); static Map tabularDataToMap(TabularData table); static Map<List<?>, Map<String, Object>> tabularDataToMapOfMaps(TabularData table); static Map<String, Object> compositeDataToMap(CompositeData data);  }### Answer:
@Test public void testCompositeDataToMap() throws Exception { CompositeType compositeType = new CompositeType( "MyCompositeType", "my composite descr", new String[] {"key1", "key2"}, new String[] {"key1 descr", "key2 descr"}, new OpenType[] {SimpleType.STRING, SimpleType.STRING}); Map<String, ?> items = ImmutableMap.of( "key1", "val1", "key2", "val2"); CompositeData data = new CompositeDataSupport(compositeType, items); Map<String,?> result = JmxValueFunctions.compositeDataToMap(data); assertEquals(result, items); Map<?,?> result2 = JmxValueFunctions.compositeDataToMap().apply(data); assertEquals(result2, items); }