We should also add a test to check the new disconnecting functionality, i.e. connect, disconnect, check state = disconnected?