How to test AI procedures before they touch real data

How to test AI procedures before they touch real data, the same way engineers test code.