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 shouldBuildMaterializationWithMapTransform() {
    // Given:
    factory.create(materialization, info, queryId, contextStacker);
    when(mapper.transform(any(), any(), any())).thenReturn(rowOut);

    final Transform transform = getTransform(0);

    // When:
    final Optional<GenericRow> result = transform.apply(keyIn, rowIn, ctx);

    // Then:
    assertThat(result, is(Optional.of(rowOut)));
  }