Adding test for defec MAGN-2521
There is one more change made for clean up after each test execution.