Added test cases to cover the new conditions added