SchemaRepository { public Schema get(TypeToken<?> type, ApiConfig config) { Map<TypeToken<?>, Schema> typesForConfig = getAllTypesForConfig(config); type = ApiAnnotationIntrospector.getSchemaType(type, config); Schema schema = typesForConfig.get(type); if (schema != null) { if (schema == PLACEHOLDER_SCHEMA) { throw new IllegalStateException("schema repository is in a bad state!"); } return schema; } return null; } SchemaRepository(TypeLoader typeLoader); Schema get(TypeToken<?> type, ApiConfig config); Schema getOrAdd(TypeToken<?> type, ApiConfig config); ImmutableList<Schema> getAllSchemaForApi(ApiKey apiKey);  }
@Test public void get() { TypeToken<Parameterized<Integer>> type = new TypeToken<Parameterized<Integer>>() {}; assertThat(repo.get(type, config)).isNull(); repo.getOrAdd(type, config); checkParameterizedSchema(repo.get(type, config), Integer.class); }