Added test scripts and minor other changes.
Added Kafka test.