Test these separately!
Serialization should be tested directly with your serialization mechanism of choice.
For example, if you are using JSON and Gson, have canned JSON strings that you deserialize and verify the result of.
Behavior based on network responses can be tested by using fake implementations of the Retrofit interfaces that you use in the tests rather than calling
RestAdapter.create
.class FakeFoo implements Foo { // Foo is your Retrofit interface @Override public FooResponse doSomething(FooRequest request) { return new FooResponse("Fake", "Data"); } }