  @Test
  public void syncPostForSuccess() throws Exception {

    MockResponse response = new MockResponse()
        .addHeader("Content-Type", "application/json; charset=utf-8")
        .setBody("{\n" +
            "  \"no\": 123,\n" +
            "  \"name\": \"Hello\"\n" +
            "}");

    server.enqueue(response);

    MyApiPost myApi = new Wasp.Builder(context)
        .setEndpoint(server.url("/v1").toString())
        .setNetworkStack(VolleyNetworkStack.newInstance(requestQueue))
        .build()
        .create(MyApiPost.class);

    try {
      User user = myApi.user(new User("Hello", 1));
      assertThat(user).isNotNull();
    } catch (Exception e) {
      fail();
    }

    RecordedRequest request = server.takeRequest();
    assertThat(request.getPath()).isEqualTo("/v1/user");
    assertThat(request.getMethod()).isEqualTo("POST");

    verify(executor).execute(any(Runnable.class));
    verifyNoMoreInteractions(executor);
  }