Add tests for generic utils