added rest endtoend testing 'framework'

Also migrated static helper methods to RestTest for shared usage