### Question:
TypeUtils { public static Type[] getResolvedInterfaces(Type type) { Utils.checkNotNull(type, "type"); Class<?> rawType = getErasedReferenceType(type); Type[] interfaces = rawType.getGenericInterfaces(); Type[] resolvedInterfaces = new Type[interfaces.length]; for (int i = 0; i < interfaces.length; i++) { resolvedInterfaces[i] = resolveTypeVariables(interfaces[i], type); } return resolvedInterfaces; } 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 getResolvedInterfacesWithPrimitive() { assertArrayEquals(new Type[0], TypeUtils.getResolvedInterfaces(int.class)); }
@Test public void getResolvedInterfacesWithPrimitiveArray() { Type[] expectedInterfaces = new Type[] { Cloneable.class, Serializable.class }; assertArrayEquals(expectedInterfaces, TypeUtils.getResolvedInterfaces(int[].class)); }
@Test public void getResolvedInterfacesWithClass() { Type[] expectedInterfaces = new Type[] { valueOf("java.lang.Comparable<Integer>") }; assertArrayEquals(expectedInterfaces, TypeUtils.getResolvedInterfaces(Integer.class)); }
@Test public void getResolvedInterfacesWithArrayClass() { Type[] expectedInterfaces = new Type[] { Cloneable.class, Serializable.class }; assertArrayEquals(expectedInterfaces, TypeUtils.getResolvedInterfaces(Integer[].class)); }
@Test public void getResolvedInterfacesWithTypeVariable() { assertArrayEquals(new Type[0], TypeUtils.getResolvedInterfaces(Types.typeVariable(declaration, "T"))); }
@Test public void getResolvedInterfacesWithGenericArray() { Type[] expectedInterfaces = new Type[] { Cloneable.class, Serializable.class }; assertArrayEquals(expectedInterfaces, TypeUtils.getResolvedInterfaces(Types.genericArrayType(Integer.class))); }
@Test public void getResolvedInterfacesWithParameterizedType() { Type[] expectedInterfaces = new Type[] { valueOf("List<Integer>"), RandomAccess.class, Cloneable.class, Serializable.class }; assertArrayEquals(expectedInterfaces, TypeUtils.getResolvedInterfaces(valueOf("ArrayList<Integer>"))); }
@Test(expected = IllegalArgumentException.class) public void getResolvedInterfacesWithWildcardType() { TypeUtils.getResolvedInterfaces(Types.unboundedWildcardType()); }
@Test(expected = NullPointerException.class) public void getResolvedInterfacesWithNull() { TypeUtils.getResolvedInterfaces(null); }