refactor tests.