Add a test case for the onCompleted handler.