Can we get a unit test for this function?