test: extract an assertion method