If the source database doesn't contain useful test material, your code will not do the right things and there's nothing you can do to fix it. As evidenced by the fruitless four hours yesterday afternoon, trying to find the problem.
This might have been just as much on topic in the blowing off steam thread.