Types { public static boolean isCollectionResponseType(TypeToken<?> type) { return type.isSubtypeOf(CollectionResponse.class); }  static boolean isArrayType(TypeToken<?> type); static boolean isEnumType(TypeToken<?> type); static boolean isMapType(TypeToken<?> type); static boolean isConcreteType(Type type); static boolean isJavaClientEntity(TypeToken<?> type); static boolean isTypeVariable(TypeToken<?> type); static boolean isCollectionResponseType(TypeToken<?> type); static boolean isWildcardType(TypeToken<?> type); static boolean isObject(TypeToken<?> type); static String getSimpleName(TypeToken<?> type, ApiSerializationConfig config); static TypeToken<?> getArrayItemType(TypeToken<?> type); static TypeToken<?> getTypeParameter(TypeToken<?> type, int index);  }
@Test public void isCollectionResponseType() { final class MyResponse extends CollectionResponse { protected MyResponse(Collection items, String nextPageToken) { super(items, nextPageToken); } } assertThat(Types.isCollectionResponseType(TypeToken.of(CollectionResponse.class))).isTrue(); assertThat(Types.isCollectionResponseType(TypeToken.of(MyResponse.class))).isTrue(); assertThat(Types.isCollectionResponseType(TypeToken.of(Collection.class))).isFalse(); }