public static TypeDescriptor<String> strings() {
    return new TypeDescriptor<String>() {};
  }
@Test
  public void testTypeDescriptorsTypeParameterOfErased() throws Exception {
    Generic<Integer, String> instance = TypeDescriptorsTest.typeErasedGeneric();

    TypeDescriptor<Integer> fooT = extractFooT(instance);
    assertNotNull(fooT);
    // Using toString() assertions because verifying the contents of a Type is very cumbersome,
    // and the expected types can not be easily constructed directly.
    assertEquals("ActualFooT", fooT.toString());

    assertEquals(strings(), extractBarT(instance));

    TypeDescriptor<KV<Integer, String>> kvT = extractKV(instance);
    assertNotNull(kvT);
    assertThat(kvT.toString(), CoreMatchers.containsString("KV<ActualFooT, java.lang.String>"));
  }