### Question:
GenericType { public GenericType getMapKeyType() { return getTypeArgument(MAP_KEY_TYPE_VAR, Map.class); } GenericType(Class<?> declaringClass, Type type); Class<?> getRawType(); String toString(); GenericType getArrayElementType(); GenericType getElementType(); GenericType getListElementType(); GenericType getMapKeyType(); GenericType getMapValueType(); GenericType getSetElementType(); boolean isArray(); boolean isList(); boolean isMap(); boolean isSet();  }### Answer:
@Test public void testGetMapKeyType() throws Exception { GenericType type = new GenericType(Sub.class, Super.class.getField("map").getGenericType()); assertEquals(String.class, type.getMapKeyType().getRawType()); }