Can you please add some unit tests for this functionality?