tests for RestModel