Fixed and refactored so that test does not depend on base test classes and so that resources are properly disposed