public class ConnectTest
extends java.lang.Object
To test whether Instance could connect to stream manager successfully.
It will have a mock stream manager, which will:
1. Open a socket, and waiting for the RegisterInstanceRequest constructed by us
2. Once receiving a RegisterInstanceRequest, check whether the RegisterInstanceRequest's info matches
the one we constructed.
3. Send back a mock RegisterInstanceResponse with Physical Plan.
4. Check whether the Instance adds the Physical Plan to the singletonRegistry.