could possibly just set an `expected_count` or similar in the if/else cause and do the assert once afterwards