Add tests for 100% branch coverage