TST: Added tests to test Deprecation warning