Add tests for rest adapter

This adds tests for `RestAdapter`.