Fix tests to use new functionality