@Test
public void findUsersByKeyword() throws Exception {

    server.enqueue(new MockResponse().setBody("{\n"
          + "  \"users\": {\n"
          + "    \"items\": [\n"
          + "      {\n"
          + "        \"user\": {\n"
          + "          \"id\": \"2_abcdef\"\n"
          + "        }\n"
          + "      },\n"
          + "      {\n"
          + "        \"user\": {\n"
          + "          \"id\": \"3_ad7e12\"\n"
          + "        }\n"
          + "      }\n"
          + "    ],\n"
          + "    \"total\": 2\n"
          + "  }\n"
          + '}'));
    Response<List<XingUser>, HttpError> response = resource.findUsersByKeyword("test").execute();
    // If no exception was thrown then the spec is build correctly.
    assertThat(response.body().size()).isEqualTo(2);
    assertThat(response.body().get(0).id()).isEqualTo("2_abcdef");
    assertThat(response.body().get(1).id()).isEqualTo("3_ad7e12");
}