Change tests so that the heuristics can be mocked easily