Leave data in a consistent state within API unit tests

I hope this fixes the failures we keep seeing on travis

Change-Id: Id86204e8021f15fc274f664af1d126799e8ba24e
Merge "Leave data in a consistent state within API unit tests"