Added a test for the case when we wait on a hub invocation from the client

#2153