### Question:
ReflectionHelper { public static boolean isMap(Type type) { if ( type instanceof Class && isMapClass( ( Class ) type ) ) { return true; } if ( type instanceof ParameterizedType ) { return isMap( ( ( ParameterizedType ) type ).getRawType() ); } if ( type instanceof WildcardType ) { Type[] upperBounds = ( ( WildcardType ) type ).getUpperBounds(); return upperBounds.length != 0 && isMap( upperBounds[0] ); } return false; } private  ReflectionHelper(); @SuppressWarnings("unchecked") static T getAnnotationParameter(Annotation annotation, String parameterName, Class<T> type); static String getPropertyName(Member member); static Class<?> getType(Member member); static Class<?> getAnnotations(Member member); static Type typeOf(Member member); static Object getValue(Member member, Object object); static void setAccessibility(Member member); static Class<?> loadClass(String name, Class<?> caller); static Type getIndexedType(Type type); static boolean isIterable(Type type); static boolean isMap(Type type); static Object getIndexedValue(Object value, String index); static boolean containsMember(Class<?> clazz, String property); static boolean containsField(Class<?> clazz, String fieldName); static Field getField(Class<?> clazz, String fieldName); static boolean containsMethod(Class<?> clazz, String methodName); static Method getMethod(Class<?> clazz, String methodName); static Class<?> classForName(String name, Class<?> caller);  }### Answer:
@Test public void testIsMap() throws Exception { assertTrue( ReflectionHelper.isMap( Map.class ) ); assertTrue( ReflectionHelper.isMap( SortedMap.class ) ); Type type = TestTypes.class.getField( "objectMap" ).getGenericType(); assertTrue( ReflectionHelper.isMap( type ) ); assertFalse( ReflectionHelper.isMap( null ) ); assertFalse( ReflectionHelper.isMap( Object.class ) ); }