use of io.aklivity.zilla.specs.binding.kafka.internal.types.stream.KafkaBootstrapBeginExFW in project zilla by aklivity.
the class KafkaFunctionsTest method shouldGenerateBootstrapBeginExtension.
@Test
public void shouldGenerateBootstrapBeginExtension() {
byte[] build = KafkaFunctions.beginEx().typeId(0x01).bootstrap().topic("topic").build().build();
DirectBuffer buffer = new UnsafeBuffer(build);
KafkaBeginExFW beginEx = new KafkaBeginExFW().wrap(buffer, 0, buffer.capacity());
assertEquals(0x01, beginEx.typeId());
assertEquals(KafkaApi.BOOTSTRAP.value(), beginEx.kind());
final KafkaBootstrapBeginExFW bootstrapBeginEx = beginEx.bootstrap();
assertEquals("topic", bootstrapBeginEx.topic().asString());
}
Aggregations