Assert the return value in the test
Remove warning of shadowing outer local variable