Factoring out common evaluate methods used in unit tests.