How do you do a work-hire test for someone who already has a job, and is not allowed to work on another company's stuff?
I'm assuming if it was a fake problem, it wouldn't be something the other company could actually use.
One thing to realize is that your employer can't really retaliate. The hypothetical iOS app I mentioned is set up for one purpose: to let candidates show they can do work the company is looking for. Not only will the code be thrown away, but it wouldn't make any sense to use it.