### Question:
JavaTypeInspector implements ITypeInspector { @Override public boolean isCollection(Type type) { if (type instanceof Class) { var clazz = (Class)type; if (clazz.isArray()) { return true; } if (Collection.class.isAssignableFrom(clazz)) { return true; } } else if (type instanceof ParameterizedType) { return isCollection(((ParameterizedType) type).getRawType()); } return false; }  @Override boolean isSimpleType(Type type); @Override boolean isCollection(Type type); @Override Type getCollectionComponentType(Type type); @Override boolean isSupport(Type type);  }### Answer:
@Test public void testIsCollection() { assertTrue(_typeInspector.isCollection(List.class)); assertTrue(_typeInspector.isCollection(ArrayList.class)); assertTrue(_typeInspector.isCollection(int[].class)); assertTrue(_typeInspector.isCollection(Integer[].class)); assertTrue(_typeInspector.isCollection(Class[].class)); }
@Test public void testIsCollection_ParameterizedType() throws NoSuchMethodException { var type = TestJavaTypeInspector.class.getMethod("test1").getGenericReturnType(); assertTrue(_typeInspector.isCollection(type)); }