Added tests for persistent connection