Add test cases for 65% branch coverage