Fix tests broken by refactoring