Insert function with test.