Refactored tests to extract a simple base that eases resource management