Add integration test for custom functions