### Question:
DirectMessageTemplate extends AbstractTwitterOperations implements DirectMessageOperations { public void deleteDirectMessage(long messageId) { requireUserAuthorization(); MultiValueMap<String, Object> data = new LinkedMultiValueMap<String, Object>(); data.add("id", String.valueOf(messageId)); restTemplate.postForObject(buildUri("direct_messages/destroy.json"), data, DirectMessage.class); } DirectMessageTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser, boolean isAuthorizedForApp); List<DirectMessage> getDirectMessagesReceived(); List<DirectMessage> getDirectMessagesReceived(int page, int pageSize); List<DirectMessage> getDirectMessagesReceived(int page, int pageSize, long sinceId, long maxId); List<DirectMessage> getDirectMessagesSent(); List<DirectMessage> getDirectMessagesSent(int page, int pageSize); List<DirectMessage> getDirectMessagesSent(int page, int pageSize, long sinceId, long maxId); DirectMessage getDirectMessage(long id); DirectMessage sendDirectMessage(String toScreenName, String text); DirectMessage sendDirectMessage(long toUserId, String text); void deleteDirectMessage(long messageId);  }### Answer:
@Test public void deleteDirectMessage() { mockServer.expect(requestTo("https: .andExpect(method(POST)) .andExpect(content().string("id=42")) .andRespond(withSuccess(jsonResource("directMessage"), APPLICATION_JSON)); twitter.directMessageOperations().deleteDirectMessage(42L); mockServer.verify(); }