@Test public void getPersonalNamespaces_withIoException_shouldCloseImapConnection() throws Exception { ImapConnection imapConnection = mock(ImapConnection.class); doThrow(IOException.class).when(imapConnection).executeSimpleCommand("LIST \"\" \"*\""); imapStore.enqueueImapConnection(imapConnection); try { imapStore.getFolders(true); fail("Expected exception"); } catch (MessagingException ignored) { } verify(imapConnection).close(); }
@Override @NonNull public List<ImapFolder> getFolders(boolean forceListAll) throws MessagingException { return getPersonalNamespaces(forceListAll); }
ImapStore extends RemoteStore { @Override @NonNull public List<ImapFolder> getFolders(boolean forceListAll) throws MessagingException { return getPersonalNamespaces(forceListAll); } }
ImapStore extends RemoteStore { @Override @NonNull public List<ImapFolder> getFolders(boolean forceListAll) throws MessagingException { return getPersonalNamespaces(forceListAll); } ImapStore(StoreConfig storeConfig, TrustedSocketFactory trustedSocketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider); }
ImapStore extends RemoteStore { @Override @NonNull public List<ImapFolder> getFolders(boolean forceListAll) throws MessagingException { return getPersonalNamespaces(forceListAll); } ImapStore(StoreConfig storeConfig, TrustedSocketFactory trustedSocketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider); static ImapStoreSettings decodeUri(String uri); static String createUri(ServerSettings server); @Override @NonNull ImapFolder getFolder(String folderId); @Override @NonNull List<ImapFolder> getFolders(boolean forceListAll); @Override @NonNull List<ImapFolder> getSubFolders(final String parentFolderId, boolean forceListAll); @NonNull List<ImapFolder> getPersonalNamespaces(boolean forceListAll); @Override void checkSettings(); @Override boolean isMoveCapable(); @Override boolean isCopyCapable(); @Override boolean isPushCapable(); @Override boolean isExpungeCapable(); @Override Pusher getPusher(PushReceiver receiver); String getFolderName(String id); }
ImapStore extends RemoteStore { @Override @NonNull public List<ImapFolder> getFolders(boolean forceListAll) throws MessagingException { return getPersonalNamespaces(forceListAll); } ImapStore(StoreConfig storeConfig, TrustedSocketFactory trustedSocketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider); static ImapStoreSettings decodeUri(String uri); static String createUri(ServerSettings server); @Override @NonNull ImapFolder getFolder(String folderId); @Override @NonNull List<ImapFolder> getFolders(boolean forceListAll); @Override @NonNull List<ImapFolder> getSubFolders(final String parentFolderId, boolean forceListAll); @NonNull List<ImapFolder> getPersonalNamespaces(boolean forceListAll); @Override void checkSettings(); @Override boolean isMoveCapable(); @Override boolean isCopyCapable(); @Override boolean isPushCapable(); @Override boolean isExpungeCapable(); @Override Pusher getPusher(PushReceiver receiver); String getFolderName(String id);  }