Tested for 3 test cases