Minor refactor on tests