refactor core tests