### Question:
WebDavStore extends RemoteStore { @Override @NonNull public WebDavFolder getFolder(String name) { WebDavFolder folder = this.folderList.get(name); if (folder == null) { folder = new WebDavFolder(this, name); folderList.put(name, folder); } return folder; } WebDavStore(StoreConfig storeConfig, QMailHttpClientFactory clientFactory); static WebDavStoreSettings decodeUri(String uri); static String createUri(ServerSettings server); @Override void checkSettings(); @Override @NonNull List<? extends Folder> getFolders(boolean forceListAll); @NonNull @Override List<? extends Folder> getSubFolders(String parentFolderId, boolean forceListAll); @Override @NonNull WebDavFolder getFolder(String name); @Override boolean isMoveCapable(); @Override boolean isCopyCapable(); CookieStore getAuthCookies(); String getAlias(); String getUrl(); QMailHttpClient getHttpClient(); String getAuthString(); @Override boolean isSendCapable(); @Override void sendMessages(List<? extends Message> messages);  }### Answer:
@Test public void getFolder_shouldReturnWebDavFolderInstance() throws Exception { WebDavStore webDavStore = createDefaultWebDavStore(); Folder result = webDavStore.getFolder("INBOX"); assertEquals(WebDavFolder.class, result.getClass()); }
@Test public void getFolder_calledTwice_shouldReturnFirstInstance() throws Exception { WebDavStore webDavStore = createDefaultWebDavStore(); String folderName = "Trash"; Folder webDavFolder = webDavStore.getFolder(folderName); Folder result = webDavStore.getFolder(folderName); assertSame(webDavFolder, result); }