Basic test for try-with-resources