### Question:
TypeUtils { public static boolean isSimpleParameterizedType(Type type, Class<?> rawType) { Utils.checkNotNull(type, "type"); Utils.checkNotNull(rawType, "rawType"); if (!(type instanceof ParameterizedType)) { return false; } ParameterizedType paramType = (ParameterizedType) type; Type paramRawType = paramType.getRawType(); if (!(paramRawType instanceof Class<?>)) { return false; } Class<?> paramRawClass = (Class<?>) paramRawType; if (!rawType.isAssignableFrom(paramRawClass)) { return false; } Type[] typeArgs = paramType.getActualTypeArguments(); return (typeArgs.length == 1); } 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(expected = NullPointerException.class) public void isSimpleParameterizedTypeWithNullType() { TypeUtils.isSimpleParameterizedType(null, List.class); }
@Test(expected = NullPointerException.class) public void isSimpleParameterizedTypeWithNullRawType() { TypeUtils.isSimpleParameterizedType(List.class, null); }
@Test public void isSimpleParameterizedTypeWithSameRawType() { assertTrue(TypeUtils.isSimpleParameterizedType(valueOf("List<Integer>"), List.class)); }
@Test public void isSimpleParameterizedTypeWithSuperRawType() { assertTrue(TypeUtils.isSimpleParameterizedType(valueOf("List<Integer>"), Collection.class)); }
@Test public void isSimpleParameterizedTypeWithUnassignableRawType() { assertFalse(TypeUtils.isSimpleParameterizedType(valueOf("List<Integer>"), Number.class)); }
@Test public void isSimpleParameterizedTypeWithClass() { assertFalse(TypeUtils.isSimpleParameterizedType(List.class, List.class)); }
@Test public void isSimpleParameterizedTypeWithParameterizedTypeArgument() { assertTrue(TypeUtils.isSimpleParameterizedType(valueOf("List<List<Integer>>"), List.class)); }