### Question:
ImapPusher implements Pusher { @Override public void start(List<String> folderNames) { synchronized (folderPushers) { stop(); setLastRefresh(currentTimeMillis()); for (String folderName : folderNames) { ImapFolderPusher pusher = createImapFolderPusher(folderName); folderPushers.add(pusher); pusher.start(); } } } ImapPusher(ImapStore store, PushReceiver pushReceiver); @Override void start(List<String> folderNames); @Override void refresh(); @Override void stop(); @Override int getRefreshInterval(); @Override long getLastRefresh(); @Override void setLastRefresh(long lastRefresh);  }### Answer:
@Test public void start_withSingleFolderName_shouldCreateImapFolderPusherAndCallStartOnIt() throws Exception { List<String> folderNames = Collections.singletonList("INBOX"); imapPusher.start(folderNames); List<ImapFolderPusher> imapFolderPushers = imapPusher.getImapFolderPushers(); assertEquals(1, imapFolderPushers.size()); ImapFolderPusher imapFolderPusher = imapFolderPushers.get(0); verify(imapFolderPusher).start(); }
@Test public void start_withTwoFolderNames_shouldCreateTwoImapFolderPushersAndCallStart() throws Exception { List<String> folderNames = Arrays.asList("Important", "Drafts"); imapPusher.start(folderNames); List<ImapFolderPusher> imapFolderPushers = imapPusher.getImapFolderPushers(); assertEquals(2, imapFolderPushers.size()); ImapFolderPusher imapFolderPusherOne = imapFolderPushers.get(0); ImapFolderPusher imapFolderPusherTwo = imapFolderPushers.get(1); verify(imapFolderPusherOne).start(); verify(imapFolderPusherTwo).start(); }