Fix tests and add more robust tests for deprecated methods