### Question:
TypeUtils { public static Type getComponentType(Type type) { if (type instanceof Class<?>) { Class<?> klass = (Class<?>) type; return klass.isArray() ? klass.getComponentType() : null; } if (type instanceof GenericArrayType) { return ((GenericArrayType) type).getGenericComponentType(); } return null; } private  TypeUtils(); static boolean isAssignable(Type supertype, Type type); static boolean isInstance(Type type, Object object); static Type getErasedType(Type type); static Class<?> getErasedReferenceType(Type type); @Deprecated static Class<?> getRawType(Type type); static boolean isArray(Type type); static Type getComponentType(Type type); static Type getArrayType(Type componentType); static boolean isSimpleParameterizedType(Type type, Class<?> rawType); static Type getActualTypeArgument(Type type); static Type getResolvedSuperclass(Type type); static Type[] getResolvedInterfaces(Type type); static String toString(Type type); static String toString(Type type, ClassSerializer serializer); static String toUnqualifiedString(Type type); static String toSimpleString(Type type);  }### Answer:
@Test public void getComponentTypeWithNull() { assertNull(TypeUtils.getComponentType(null)); }
@Test public void getComponentTypeWithClass() { assertNull(TypeUtils.getComponentType(Integer.class)); }
@Test public void getComponentTypeWithClassArray() { assertEquals(Integer.class, TypeUtils.getComponentType(Integer[].class)); }
@Test public void getComponentTypeWithTypeVariable() { assertNull(TypeUtils.getComponentType(Types.typeVariable(declaration, "T"))); }
@Test public void getComponentTypeWithGenericArrayType() { assertEquals(Integer.class, TypeUtils.getComponentType(Types.genericArrayType(Integer.class))); }
@Test public void getComponentTypeWithParameterizedType() { assertNull(TypeUtils.getComponentType(Types.parameterizedType(List.class, Integer.class))); }
@Test public void getComponentTypeWithWildcardType() { assertNull(TypeUtils.getComponentType(Types.unboundedWildcardType())); }