### Question:
TypeUtils { public static boolean isMap(Type type) { return Map.class.isAssignableFrom(getRawType(type)); } private  TypeUtils(); static boolean isCollection(Type type); static boolean isMap(Type type); static Type getCollectionGeneric(Type type); static Type getMapValueGeneric(Type type); static Class<?> getRawType(Type type);  }### Answer:
@Test void shouldCheckIfTypeIsMapWhenMapPassed() { Type type = org.apache.commons.lang3.reflect.TypeUtils.parameterize(Map.class, String.class, String.class); boolean isMap = TypeUtils.isMap(type); assertThat(isMap).isTrue(); }
@Test void shouldCheckIfTypeIsMapWhenNotMapPassed() { Type type = String.class; boolean isMap = TypeUtils.isMap(type); assertThat(isMap).isFalse(); }