@Test
  public void testIsCastingUnchecked() {
    TypeElement erasureClass = typeElementOf(Erasure.class);
    List<VariableElement> fields = ElementFilter.fieldsIn(erasureClass.getEnclosedElements());
    assertThat(fields).isNotEmpty();
    for (VariableElement field : fields) {
      String fieldName = field.getSimpleName().toString();
      boolean expectUnchecked;
      if (fieldName.endsWith("Yes")) {
        expectUnchecked = true;
      } else if (fieldName.endsWith("No")) {
        expectUnchecked = false;
      } else {
        throw new AssertionError("Fields in Erasure class must end with Yes or No: " + fieldName);
      }
      TypeMirror fieldType = field.asType();
      boolean actualUnchecked = TypeSimplifier.isCastingUnchecked(fieldType);
      assertWithMessage("Unchecked-cast status for " + fieldType)
          .that(actualUnchecked)
          .isEqualTo(expectUnchecked);
    }
  }
This test shows why we need to have TypeMirrorSet. The mirror of java.lang.Object obtained from
{@link Elements#getTypeElement Elements.getTypeElement("java.lang.Object")} does not compare
equal to the mirror of the return type of Object.clone(), even though that is also
java.lang.Object and {@link Types#isSameType} considers them the same.

<p>There's no requirement that this test must pass and if it starts failing or doesn't work in
another test environment then we can delete it. The specification of {@link TypeMirror#equals}
explicitly says that it cannot be used for type equality, so even if this particular case stops
being a problem (which means this test would fail), we would need TypeMirrorSet for complete
correctness.
value/src/test/java/com/google/auto/value/processor/TypeSimplifierTest.java