Fix function unit test.