updated unit tests with the new api