### Question:
PropertyUtil { public static boolean isMapProperty(Type type) { if (type instanceof Class) { return isMapProperty((Class<?>)type); } if (type instanceof ParameterizedType) { return isMapProperty((Class<?>)((ParameterizedType) type).getRawType()); } return false; } private  PropertyUtil(); static boolean isSimpleProperty(Class<?> clazz); static boolean isSimpleValueType(Class<?> clazz); static boolean isCollectionProperty(Type type, boolean includeMaps); static boolean isCollectionProperty(Class<?> clazz, boolean includeMaps); static boolean isMapProperty(Type type); static boolean isMapProperty(Class<?> clazz); static Class<?> getCollectionElementType(Type type); static Object getProperty(Object bean, String name); static void setProperty(Object bean, String name, Object value); static Method getReadMethod(Object bean, String name); static Boolean isPrimitiveOrWrapper(Class<?> clazz);  }### Answer:
@Test public void shouldCheckIfMapPropertyWithClass() { assertTrue(PropertyUtil.isMapProperty(HashMap.class)); assertFalse(PropertyUtil.isMapProperty(List.class)); }
@Test public void shouldCheckIfMapPropertyWithType() throws Exception { assertTrue(PropertyUtil.isMapProperty(DummyClass.class.getField("stringMap").getGenericType())); assertFalse(PropertyUtil.isMapProperty(DummyClass.class.getField("genericObjectArray").getGenericType())); }