@Test
public void getIncomingContactRequests() throws Exception {

    server.enqueue(new MockResponse().setBody("{\n"
          + "  \"contact_requests\": [\n"
          + "    {\n"
          + "      \"sender_id\": \"6055623_5cf823\",\n"
          + "      \"sender\": {\n"
          + "        \"id\": \"6055623_5cf823\",\n"
          + "        \"display_name\": \"John Doe\"\n"
          + "      },\n"
          + "      \"message\": \"Sehr geehrter Herr Irgendwas, ich würde Sie gern zu meinen Kontakten hinzufügen"
          + "\",\n"
          + "      \"received_at\": \"2010-11-17T10:56:16Z\"\n"
          + "    }\n"
          + "  ]\n"
          + '}'));
    Response<List<ContactRequest>, HttpError> response = resource.getIncomingContactRequests().execute();
    // If no exception was thrown then the spec is build correctly.
    SafeCalendar safeCalendar = new SafeCalendar(2010, Calendar.NOVEMBER, 17, 10, 56, 16);
    safeCalendar.setTimeZone(TimeZone.getTimeZone("UTC"));
    assertThat(response.body()).hasSize(1);
    ContactRequest contactRequest = response.body().get(0);
    assertThat(contactRequest.getMessage())
          .isEqualTo("Sehr geehrter Herr Irgendwas, ich würde Sie gern zu meinen Kontakten hinzufügen");
    assertThat(contactRequest.getReceivedAt())
          .isEqualTo(safeCalendar);
    assertThat(contactRequest.getSenderId())
          .isEqualTo("6055623_5cf823");
    assertThat(contactRequest.getSender())
          .isEqualTo(new XingUser("6055623_5cf823").displayName("John Doe"));
}