Added test for shouldAttemptReconnect functionality