Use Moq in APITest.

That was much easier than expected.