Add unit test for functionality