Read Kafka topic from beginning in KStream

My spring boot project has an application that demonstrates Kafka Streams API. I am able to consume all the messages in topic customer using the command

bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic customer --from-beginning

What's the similar command in Kafka Streams API to consume messages with KStream or KTable? I tried

properties.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG,"earliest"); properties.put("auto.offset.reset", "earliest");

Both didn't work. I did create a test case to consume with KafkaConsumer instead of Streams, it didn't work. Code uploaded to Github for reference. Any help would be great.