added more condition in the test case