created required test class. Tested and it works as expected.