Wrote tests for generic resource and refactored it to satisfy Handler interface