refactor on tests definition