IMHO, your way tests the same thing as mine and is easier to understand.