Fix typo in tests

The tests are sample code, so calling close properly is a good idea even if it's not tested.