refactor checking of result so that data value can be determined
differently in each test.