Added more tests for uncovered scenarios.