@Test public void testGetNewMessageCountNoMails() throws MessagingException { when(this.inboxMock.search(ArgumentMatchers.any(FlagTerm.class))).thenReturn(new Message[0]); assertEquals(0, this.emailLogic.getNewMessageCount(false)); assertEquals(0, this.emailLogic.getNewMessageCount(true)); }
public int getNewMessageCount(boolean checkForImportant) { if (checkForImportant) { return getNewImportantMessages().size(); } return getNewMessages().size(); }
EMailLogic { public int getNewMessageCount(boolean checkForImportant) { if (checkForImportant) { return getNewImportantMessages().size(); } return getNewMessages().size(); } }
EMailLogic { public int getNewMessageCount(boolean checkForImportant) { if (checkForImportant) { return getNewImportantMessages().size(); } return getNewMessages().size(); }  }
EMailLogic { public int getNewMessageCount(boolean checkForImportant) { if (checkForImportant) { return getNewImportantMessages().size(); } return getNewMessages().size(); }  boolean hasNewMessages(boolean checkForImportant); int getNewMessageCount(boolean checkForImportant); String printMessages(int amount, boolean important); MessageDTO[] getMailsForREST(int amount); boolean connectToMailServer(EMailCredentials credentials); boolean isConnectedToMailServer(); void disconnectFromMailServer(); EMailCredentials getCredentials(); @PostConstruct void connectToMailServer(); }
EMailLogic { public int getNewMessageCount(boolean checkForImportant) { if (checkForImportant) { return getNewImportantMessages().size(); } return getNewMessages().size(); }  boolean hasNewMessages(boolean checkForImportant); int getNewMessageCount(boolean checkForImportant); String printMessages(int amount, boolean important); MessageDTO[] getMailsForREST(int amount); boolean connectToMailServer(EMailCredentials credentials); boolean isConnectedToMailServer(); void disconnectFromMailServer(); EMailCredentials getCredentials(); @PostConstruct void connectToMailServer();  }