Refactor test assertions.