Fixed the tests by changing from deprecated method calls to new method calls and fixing the imports.