LPS-49932 Update to use try with Closeable in all tests