Add unitary test for Function findById