Fixed regression in unit tests due to the use of the old API.