add test case for connection/reconnection handling