### Question:
ImapFolder extends Folder<ImapMessage> { private boolean exists(String escapedFolderName) throws MessagingException { try { connection.executeSimpleCommand(String.format("STATUS %s (RECENT)", escapedFolderName)); return true; } catch (IOException ioe) { throw ioExceptionHandler(connection, ioe); } catch (NegativeImapResponseException e) { return false; } } ImapFolder(ImapStore store, String id);   ImapFolder(ImapStore store, String id, FolderNameCodec folderNameCodec); @Override void open(int mode); @Override boolean isOpen(); @Override int getMode(); @Override void close(); @Override String getId(); @Override String getParentId(); @Override String getName(); @Override boolean exists(); @Override boolean canHaveSubFolders(); @Override boolean create(FolderType type); @Override Map<String, String> copyMessages(List<? extends Message> messages, Folder folder); @Override Map<String, String> moveMessages(List<? extends Message> messages, Folder folder); @Override void delete(List<? extends Message> messages, String trashFolderName); @Override int getMessageCount(); @Override int getUnreadMessageCount(); @Override int getFlaggedMessageCount(); @Override void delete(boolean recurse); @Override ImapMessage getMessage(String uid); @Override List<ImapMessage> getMessages(int start, int end, Date earliestDate,
            MessageRetrievalListener<ImapMessage> listener); @Override boolean areMoreMessagesAvailable(int indexOfOldestMessage, Date earliestDate); @Override void fetch(List<ImapMessage> messages, FetchProfile fetchProfile,
            MessageRetrievalListener<ImapMessage> listener); @Override void fetchPart(Message message, Part part, MessageRetrievalListener<Message> listener,
            BodyFactory bodyFactory); @Override Map<String, String> appendMessages(List<? extends Message> messages); @Override String getUidFromMessageId(Message message); @Override void expunge(); @Override void setFlags(Set<Flag> flags, boolean value); @Override String getNewPushState(String oldSerializedPushState, Message message); @Override void setFlags(List<? extends Message> messages, final Set<Flag> flags, boolean value); @Override boolean equals(Object other); @Override int hashCode(); @Override List<ImapMessage> search(final String queryString, final Set<Flag> requiredFlags,
            final Set<Flag> forbiddenFlags);  }### Answer:
@Test public void exists_withoutNegativeImapResponse_shouldReturnTrue() throws Exception { ImapFolder imapFolder = createFolder("Folder"); when(imapStore.getConnection()).thenReturn(imapConnection); boolean folderExists = imapFolder.exists(); assertTrue(folderExists); }