We cannot test whether the file closed successfully, but we can test that the code reaches that branch of the logic.