@Test
public void testStreamTransformers() {

    MediatorConfigurationSupport support = create("transformerPublisherOfMessage");
    MediatorConfigurationSupport.ValidationOutput output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_MESSAGE);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_MESSAGE);
    assertThat(output.getIngestedPayloadType()).isEqualTo(Person.class);
    assertThat(output.getUseBuilderTypes()).isFalse();
    support = create("transformerPublisherOfPayload");
    output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_PAYLOAD);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_PAYLOAD);
    assertThat(output.getIngestedPayloadType()).isEqualTo(Person.class);
    assertThat(output.getUseBuilderTypes()).isFalse();
    support = create("transformerMultiOfMessage");
    output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_MESSAGE);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_MESSAGE);
    assertThat(output.getIngestedPayloadType()).isEqualTo(Person.class);
    assertThat(output.getUseBuilderTypes()).isFalse();
    support = create("transformerMultiOfPayload");
    output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_PAYLOAD);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_PAYLOAD);
    assertThat(output.getIngestedPayloadType()).isEqualTo(Person.class);
    assertThat(output.getUseBuilderTypes()).isFalse();
    support = create("transformerPublisherBuilderOfMessage");
    output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_MESSAGE);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_MESSAGE);
    assertThat(output.getIngestedPayloadType()).isEqualTo(Person.class);
    assertThat(output.getUseBuilderTypes()).isTrue();
    support = create("transformerPublisherBuilderOfPayload");
    output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_PAYLOAD);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_PAYLOAD);
    assertThat(output.getIngestedPayloadType()).isEqualTo(Person.class);
    assertThat(output.getUseBuilderTypes()).isTrue();
    support = create("transformerPublisherOfMessageRaw");
    output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_MESSAGE);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_MESSAGE);
    assertThat(output.getIngestedPayloadType()).isEqualTo(null);
    assertThat(output.getUseBuilderTypes()).isFalse();
    support = create("transformerPublisherOfMessageWildcard");
    output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_MESSAGE);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_MESSAGE);
    assertThat(output.getIngestedPayloadType()).isEqualTo(null);
    assertThat(output.getUseBuilderTypes()).isFalse();
    assertThatThrownBy(() -> create("transformerPublisherOfPayloadRaw").validate(Shape.STREAM_TRANSFORMER, null))
            .isInstanceOf(DefinitionException.class);
    support = create("transformerPublisherOfPayloadWildcard");
    output = support.validate(Shape.STREAM_TRANSFORMER, null);
    assertThat(output.getConsumption()).isEqualTo(MediatorConfiguration.Consumption.STREAM_OF_PAYLOAD);
    assertThat(output.getProduction()).isEqualTo(MediatorConfiguration.Production.STREAM_OF_PAYLOAD);
    assertThat(output.getIngestedPayloadType()).isEqualTo(null);
    assertThat(output.getUseBuilderTypes()).isFalse();
}