@Test
public void testUnknownParameterType() throws Exception {

  final class Foo<T> {
    @SuppressWarnings("unused")
    public void foo(T t) {}
  }
  TypeToken<?> unknownType = TypeToken.of(
      Foo.class.getDeclaredMethod("foo", Object.class).getGenericParameterTypes()[0]);
  config.getApiClassConfig().getMethods()
      .get(methodToEndpointMethod(TestEndpoint.class.getMethod("getResultNoParams")))
      .addParameter("param", null, false, null, unknownType);
  try {
    validator.validate(config);
    fail("Expected GenericTypeException.");
  } catch (GenericTypeException expected) {
  }
}