added insert if not exist functional test