fix in unit test to new api.