@SuppressWarnings("unchecked")
  public static <S, F> S visit(final Schema schema, final Visitor<S, F> visitor) {
    final BiFunction<Visitor<?, ?>, Schema, Object> handler = HANDLER.get(schema.type());
    if (handler == null) {
      throw new UnsupportedOperationException("Unsupported schema type: " + schema.type());
    }

    return (S) handler.apply(visitor, schema);
  }
@Test
  public void shouldThrowByDefaultFromNonStructured() {
    // Given:
    visitor = new Visitor<String, Integer>() {
    };

    nonStructuredSchemas().forEach(schema -> {

      try {
        // When:
        SchemaWalker.visit(schema, visitor);

        fail();

      } catch (final UnsupportedOperationException e) {
        // Then:
        assertThat(e.getMessage(), is("Unsupported schema type: " + schema));
      }
    });
  }