Fixing incorrect function calls in unit tests