Added test infrastructure to support a mocked API
Rebuilt failure testing to use mocked API
Added success test