Rewrite existing Resource tests to use table driven testing

improve generic error response functions