Added code to generate a stream name and added unit tests