added unit tests for subscribe and unsubscribe