### Question:
Bot extends PircBot { @Override protected void onMessage(String argChannel, String argSender, String argLogin, String argHostname, String argMessage) { debug("onMessage: ", "argChannel = " + argChannel, "argSender = " + argSender, "argLogin = " + argLogin, "argHostname = " + argHostname, "argMessage = " + argMessage); batchMessages(format(argSender, argMessage)); } Bot(String argBotName, String argBotLogin, String argAlterEgoName); void addNotificationService(NotificationService argService); static final String CHARSET; }### Answer:
@Test public void test_on_message_over_batch_size() { expect(mockNotificationService.notify((String)anyObject(), (String)anyObject())).andReturn(true); replay(mockNotificationService); for (int i = 0; i <= Bot.MESSAGE_BATCH_SIZE; i++) { classUnderTest.onMessage("", "", "", "", "test"); } verify(mockNotificationService); }