@Test
public void anInterface() throws IOException, InterruptedException, ExecutionException {

    server.enqueue(new MockResponse().setBody("{\"name\":\"value\"}"));
    GsonRequest<AnInterface> request =
            new GsonRequest<>(Request.Method.POST,
                    server.url("").toString(), AnInterface.class, gson);
    request.setRequestData(new AnImplementation("value"), gson, new AnInterfaceAdapter());
    AnInterface body =
            queue.add(request).getFuture().get();
    assertThat(body.getName()).isEqualTo("value");
    RecordedRequest sRequest = server.takeRequest();
    assertThat(sRequest.getBody().readUtf8()).isEqualTo("{\"name\":\"value\"}");
    assertThat(sRequest.getHeader("Content-Type")).isEqualTo("application/json; charset=UTF-8");
    assertThat(sRequest.getHeader("Accept")).isEqualTo("application/json");
}