public Materialization create(
      final StreamsMaterialization delegate,
      final MaterializationInfo info,
      final QueryId queryId,
      final QueryContext.Stacker contextStacker
  ) {
    final TransformVisitor transformVisitor = new TransformVisitor(queryId, contextStacker);
    final List<Transform> transforms = info
        .getTransforms()
        .stream()
        .map(xform -> xform.visit(transformVisitor))
        .collect(Collectors.toList());

    return materializationFactory.create(
        delegate,
        info.getSchema(),
        transforms
    );
  }
@Test
  public void shouldReturnMaterialization() {
    // Given:
    final KsqlMaterialization ksqlMaterialization = mock(KsqlMaterialization.class);
    when(materializationFactory.create(any(), any(), any()))
        .thenReturn(ksqlMaterialization);

    // When:
    final Materialization result = factory
        .create(materialization, info, queryId, contextStacker);

    // Then:
    assertThat(result, is(ksqlMaterialization));
  }