MessagesResource extends Resource { public CallSpec<Void, HttpError> markMessageAsRead(String conversationId, String messageId, String userId) { return Resource.<Void, HttpError>newPutSpec(api, "/v1/users/{user_id}/conversations/{conversation_id}/messages/{message_id}/read", false) .pathParam("user_id", userId) .pathParam("conversation_id", conversationId) .pathParam("message_id", messageId) .responseAs(Void.class) .build(); } MessagesResource(XingApi api); CallSpec<List<Conversation>, HttpError> getConversationsByUserId(String userId); CallSpec<Conversation, HttpError> createConversation(String userId, String subject, String content,
          String... recipientIds); CallSpec<Void, HttpError> validateRecipient(String userId); CallSpec<Conversation, HttpError> getSingleConversation(String conversationId, String userId); CallSpec<List<MessageAttachment>, HttpError> getAttachmentsOfConversation(String conversationId); CallSpec<String, HttpError> getAttachmentDownloadLink(String conversationId, String attachmentId); CallSpec<Void, HttpError> markConversationAsRead(String conversationId, String userId); CallSpec<Void, HttpError> markConverastionAsUnread(String conversationId, String userId); CallSpec<List<ConversationMessage>, HttpError> getConversationMessages(String conversationId, String userId); CallSpec<ConversationMessage, HttpError> getSingleConversationMessage(String conversationId, String messageId,
          String userId); CallSpec<Void, HttpError> markMessageAsRead(String conversationId, String messageId, String userId); CallSpec<Void, HttpError> markMessageAsUnread(String conversationId, String messageId, String userId); CallSpec<ConversationMessage, HttpError> sendMessageToConversation(String userId, String conversationId,
          String messageContent); CallSpec<Void, HttpError> deleteConversation(String userId, String conversationId);  }
@Test public void markMessageAsRead() throws Exception { server.enqueue(new MockResponse().setResponseCode(HttpURLConnection.HTTP_OK)); Response<Void, HttpError> response = resource.markMessageAsRead("23", "123", "123").execute(); assertThat(response.code()).isEqualTo(HttpURLConnection.HTTP_OK); }