Unittest refactor

Generalized add, update, and get tasks methods in the response generator to now support storing any resource. Added a unit test to test api exceptions. Added more comments.