@Test public void executeSingleCommand_withOkResponse_shouldReturnResult() throws Exception { MockImapServer server = new MockImapServer(); simpleOpenDialog(server, ""); server.expect("4 CREATE Folder"); server.output("4 OK Folder created"); ImapConnection imapConnection = startServerAndCreateImapConnection(server); List<ImapResponse> result = imapConnection.executeSimpleCommand("CREATE Folder"); assertEquals(result.size(), 1); server.verifyConnectionStillOpen(); server.verifyInteractionCompleted(); }
public List<ImapResponse> executeSimpleCommand(String command) throws IOException, MessagingException { return executeSimpleCommand(command, false); }
ImapConnection { public List<ImapResponse> executeSimpleCommand(String command) throws IOException, MessagingException { return executeSimpleCommand(command, false); } }
ImapConnection { public List<ImapResponse> executeSimpleCommand(String command) throws IOException, MessagingException { return executeSimpleCommand(command, false); } ImapConnection(ImapSettings settings, TrustedSocketFactory socketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider);   ImapConnection(ImapSettings settings, TrustedSocketFactory socketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider,
            int socketConnectTimeout, int socketReadTimeout); }
ImapConnection { public List<ImapResponse> executeSimpleCommand(String command) throws IOException, MessagingException { return executeSimpleCommand(command, false); } ImapConnection(ImapSettings settings, TrustedSocketFactory socketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider);   ImapConnection(ImapSettings settings, TrustedSocketFactory socketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider,
            int socketConnectTimeout, int socketReadTimeout); void open(); boolean isConnected(); void close(); OutputStream getOutputStream(); List<ImapResponse> executeSimpleCommand(String command); List<ImapResponse> executeSimpleCommand(String command, boolean sensitive); List<ImapResponse> readStatusResponse(String tag, String commandToLog, UntaggedHandler untaggedHandler); String sendSaslIrCommand(String command, String initialClientResponse, boolean sensitive); String sendCommand(String command, boolean sensitive); void sendContinuation(String continuation); ImapResponse readResponse(); ImapResponse readResponse(ImapResponseCallback callback); }
ImapConnection { public List<ImapResponse> executeSimpleCommand(String command) throws IOException, MessagingException { return executeSimpleCommand(command, false); } ImapConnection(ImapSettings settings, TrustedSocketFactory socketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider);   ImapConnection(ImapSettings settings, TrustedSocketFactory socketFactory,
            ConnectivityManager connectivityManager, OAuth2TokenProvider oauthTokenProvider,
            int socketConnectTimeout, int socketReadTimeout); void open(); boolean isConnected(); void close(); OutputStream getOutputStream(); List<ImapResponse> executeSimpleCommand(String command); List<ImapResponse> executeSimpleCommand(String command, boolean sensitive); List<ImapResponse> readStatusResponse(String tag, String commandToLog, UntaggedHandler untaggedHandler); String sendSaslIrCommand(String command, String initialClientResponse, boolean sensitive); String sendCommand(String command, boolean sensitive); void sendContinuation(String continuation); ImapResponse readResponse(); ImapResponse readResponse(ImapResponseCallback callback);  }