  @Test
  public void testIterator() {

    Schema sample = AvroSchemaGeneratorTest.getSampleSchema();
    boolean baseSeen = false, recursiveSeen = false, compositeSeen = false,
            arraySeen = false, mapSeen = false;
    for (Schema schema : new AvroSchemaIterator(sample)) {
      if (schema.getName().equals("SampleBaseType")) {
        baseSeen = true;
      }
      if (schema.getName().equals("SampleRecursiveType")) {
        recursiveSeen = true;
      }
      if (schema.getName().equals("SampleCompositeType")) {
        compositeSeen = true;
      }
    }
    assertTrue(baseSeen);
    assertTrue(recursiveSeen);
    assertTrue(compositeSeen);
  }