File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
api/src/test/java/io/kafbat/ui/service Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 1919import io .kafbat .ui .serdes .builtin .StringSerde ;
2020import io .kafbat .ui .serdes .builtin .sr .SchemaRegistrySerde ;
2121import java .time .Duration ;
22+ import java .util .Collections ;
2223import java .util .List ;
2324import java .util .Map ;
2425import java .util .Objects ;
@@ -425,6 +426,25 @@ void topicMessageMetadataJson() {
425426 });
426427 }
427428
429+ @ Test
430+ void headerValueNullPresentTest () {
431+ new SendAndReadSpec ()
432+ .withKeySchema (JSON_SCHEMA )
433+ .withValueSchema (JSON_SCHEMA )
434+ .withMsgToSend (
435+ new CreateTopicMessageDTO ()
436+ .key (JSON_SCHEMA_RECORD )
437+ .keySerde (SchemaRegistrySerde .name ())
438+ .content (JSON_SCHEMA_RECORD )
439+ .valueSerde (SchemaRegistrySerde .name ())
440+ .headers (Collections .singletonMap ("header123" , null ))
441+ )
442+ .doAssert (polled -> {
443+ assertThat (polled .getHeaders ().get ("header123" )).isNull ();
444+ });
445+ }
446+
447+
428448 @ Test
429449 void noKeyAndNoContentPresentTest () {
430450 new SendAndReadSpec ()
You can’t perform that action at this time.
0 commit comments