Added generic mocking api so tests can stage mock responses for server to respond with

Signed-off-by: Daniel Koo <danieljamin.koo@gmail.com>