### Question:
TypeUtil { public static ValueMap toValueMap(final Map<String, ?> map) { final Map<String, Object> objectMap = new LinkedHashMap<String, Object>(map.size()); for (final Map.Entry<String, ?> entry : map.entrySet()) { objectMap.put(entry.getKey(), entry.getValue()); } return new ValueMapDecorator(objectMap); } private  TypeUtil(); static Map<T, T> arrayToMap(T[] list); static Map<String, Object> toMap(JsonObject json); @SuppressWarnings({ "unchecked", "PMD.CollapsibleIfStatements" }) static Class<T> getType(final Object object); static T toObjectType(String data, Class<T> klass); static String toString(final Object obj, final Class<?> klass); static String toString(final Object obj, final Class<?> klass, String methodName); static String toString(final Object obj); static ValueMap toValueMap(final Map<String, ?> map);  }### Answer:
@Test public void testToValueMap() { final Map<String, String> stringMap = new LinkedHashMap<String, String>(); stringMap.put("one", "uno"); stringMap.put("two", "dos"); stringMap.put("three", "tres"); final Map<String, Object> objectMap = new LinkedHashMap<String, Object>(); objectMap.put("one", "uno"); objectMap.put("two", "dos"); objectMap.put("three", "tres"); final ValueMap expResult = new ValueMapDecorator(objectMap); final ValueMap actual = TypeUtil.toValueMap(stringMap); assertEquals(expResult.size(), actual.size()); assertEquals(expResult.get("one", "expected"), actual.get("one", "actual")); assertEquals(expResult.get("two", "expected"), actual.get("two", "actual")); assertEquals(expResult.get("three", "expected"), actual.get("three", "actual")); }