Worked on ticket 18003
Wrote the test using context manager