1919import java .io .File ;
2020import java .util .Collections ;
2121import java .util .HashMap ;
22+ import java .util .List ;
2223import java .util .Map ;
2324import java .util .Properties ;
2425
@@ -289,6 +290,7 @@ public void adminProperties() {
289290 });
290291 }
291292
293+ @ SuppressWarnings ("unchecked" )
292294 @ Test
293295 public void streamsProperties () {
294296 this .contextRunner .withUserConfiguration (EnableKafkaStreamsConfiguration .class )
@@ -314,15 +316,16 @@ public void streamsProperties() {
314316 Properties configs = context .getBean (
315317 KafkaStreamsDefaultConfiguration .DEFAULT_STREAMS_CONFIG_BEAN_NAME ,
316318 KafkaStreamsConfiguration .class ).asProperties ();
317- assertThat (configs .get (StreamsConfig .BOOTSTRAP_SERVERS_CONFIG ))
318- .isEqualTo ("localhost:9092, localhost:9093" );
319+ assertThat ((List <String >) configs
320+ .get (StreamsConfig .BOOTSTRAP_SERVERS_CONFIG ))
321+ .containsExactly ("localhost:9092" , "localhost:9093" );
319322 assertThat (
320323 configs .get (StreamsConfig .CACHE_MAX_BYTES_BUFFERING_CONFIG ))
321- .isEqualTo (" 1024" );
324+ .isEqualTo (1024 );
322325 assertThat (configs .get (StreamsConfig .CLIENT_ID_CONFIG ))
323326 .isEqualTo ("override" );
324327 assertThat (configs .get (StreamsConfig .REPLICATION_FACTOR_CONFIG ))
325- .isEqualTo ("2" );
328+ .isEqualTo (2 );
326329 assertThat (configs .get (StreamsConfig .STATE_DIR_CONFIG ))
327330 .isEqualTo ("/tmp/state" );
328331 assertThat (configs .get (SslConfigs .SSL_KEY_PASSWORD_CONFIG ))
@@ -354,6 +357,7 @@ public void streamsProperties() {
354357 });
355358 }
356359
360+ @ SuppressWarnings ("unchecked" )
357361 @ Test
358362 public void streamsApplicationIdUsesMainApplicationNameByDefault () {
359363 this .contextRunner .withUserConfiguration (EnableKafkaStreamsConfiguration .class )
@@ -364,8 +368,9 @@ public void streamsApplicationIdUsesMainApplicationNameByDefault() {
364368 Properties configs = context .getBean (
365369 KafkaStreamsDefaultConfiguration .DEFAULT_STREAMS_CONFIG_BEAN_NAME ,
366370 KafkaStreamsConfiguration .class ).asProperties ();
367- assertThat (configs .get (StreamsConfig .BOOTSTRAP_SERVERS_CONFIG ))
368- .isEqualTo ("localhost:9092, localhost:9093" );
371+ assertThat ((List <String >) configs
372+ .get (StreamsConfig .BOOTSTRAP_SERVERS_CONFIG ))
373+ .containsExactly ("localhost:9092" , "localhost:9093" );
369374 assertThat (configs .get (StreamsConfig .APPLICATION_ID_CONFIG ))
370375 .isEqualTo ("my-test-app" );
371376 });
@@ -390,6 +395,7 @@ public void streamsWithCustomKafkaConfiguration() {
390395 });
391396 }
392397
398+ @ SuppressWarnings ("unchecked" )
393399 @ Test
394400 public void streamsWithSeveralStreamsBuilderFactoryBeans () {
395401 this .contextRunner
@@ -402,8 +408,9 @@ public void streamsWithSeveralStreamsBuilderFactoryBeans() {
402408 Properties configs = context .getBean (
403409 KafkaStreamsDefaultConfiguration .DEFAULT_STREAMS_CONFIG_BEAN_NAME ,
404410 KafkaStreamsConfiguration .class ).asProperties ();
405- assertThat (configs .get (StreamsConfig .BOOTSTRAP_SERVERS_CONFIG ))
406- .isEqualTo ("localhost:9092, localhost:9093" );
411+ assertThat ((List <String >) configs
412+ .get (StreamsConfig .BOOTSTRAP_SERVERS_CONFIG ))
413+ .containsExactly ("localhost:9092" , "localhost:9093" );
407414 verify (context .getBean ("&firstStreamsBuilderFactoryBean" ,
408415 StreamsBuilderFactoryBean .class ), never ())
409416 .setAutoStartup (false );
0 commit comments