Search in sources :

Example 1 with NoopValueTransformerWithKey

use of org.apache.kafka.test.NoopValueTransformerWithKey in project kafka by apache.

the class StreamsBuilderTest method shouldUseSpecifiedNameForFlatTransformValueWithKeyOperation.

@Test
@SuppressWarnings({ "unchecked", "rawtypes" })
public void shouldUseSpecifiedNameForFlatTransformValueWithKeyOperation() {
    builder.stream(STREAM_TOPIC).flatTransformValues(() -> new NoopValueTransformerWithKey(), Named.as(STREAM_OPERATION_NAME));
    builder.build();
    final ProcessorTopology topology = builder.internalTopologyBuilder.rewriteTopology(new StreamsConfig(props)).buildTopology();
    assertNamesForOperation(topology, "KSTREAM-SOURCE-0000000000", STREAM_OPERATION_NAME);
}
Also used : ProcessorTopology(org.apache.kafka.streams.processor.internals.ProcessorTopology) NoopValueTransformerWithKey(org.apache.kafka.test.NoopValueTransformerWithKey) Test(org.junit.Test)

Aggregations

ProcessorTopology (org.apache.kafka.streams.processor.internals.ProcessorTopology)1 NoopValueTransformerWithKey (org.apache.kafka.test.NoopValueTransformerWithKey)1 Test (org.junit.Test)1