### Question:
WebDavMessage extends MimeMessage { @Override public void delete(String trashFolderName) throws MessagingException { WebDavFolder wdFolder = (WebDavFolder) getFolder(); Timber.i("Deleting message by moving to %s", trashFolderName); wdFolder.moveMessages(Collections.singletonList(this), wdFolder.getStore().getFolder(trashFolderName)); } WebDavMessage(String uid, Folder folder); void setUrl(String url); String getUrl(); void setSize(int size); void setFlagInternal(Flag flag, boolean set); void setNewHeaders(ParsedMessageEnvelope envelope); @Override void delete(String trashFolderName); @Override void setFlag(Flag flag, boolean set);  }### Answer:
@Test public void delete_asks_folder_to_delete_message() throws MessagingException { when(mockFolder.getStore()).thenReturn(mockStore); when(mockStore.getFolder("Trash")).thenReturn(mockTrashFolder); message.delete("Trash"); verify(mockFolder).moveMessages(Collections.singletonList(message), mockTrashFolder); }