### Question:
MessagesResource extends Resource { public CallSpec<Conversation, HttpError> getSingleConversation(String conversationId, String userId) { return Resource.<Conversation, HttpError>newGetSpec(api, "/v1/users/{user_id}/conversations/{conversation_id}") .pathParam("user_id", userId) .pathParam("conversation_id", conversationId) .responseAs(single(Conversation.class, "conversation")) .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);  }### Answer:
@Test public void getSingleConversation() throws Exception { server.enqueue(new MockResponse().setBody(file("messages/single_conversation.json"))); Response<Conversation, HttpError> response = resource.getSingleConversation("conversationid", "myUserId").execute(); Conversation conversation = response.body(); assertThat(conversation.getId()).isEqualTo("51626_4be761"); assertThat(conversation.getSubject()).isEqualTo("Business opportunities"); assertThat(conversation.getTotalMsgCount()).isEqualTo(2); assertThat(conversation.getUnreadMessageCount()).isEqualTo(1); assertThat(conversation.isReadOnly()).isFalse(); assertThat(conversation.getParticipants()).hasSize(2); assertThat(conversation.getLatestMessages()).hasSize(2); }