Associates key with stream, for handling listeners
Adds tests to verify functionality