MessageSender { protected void purgeExpiredMessages() { messengerDataService.purgeExpiredMessages(); } MessageSender( final MessengerDataService messengerDataService, final MessengerImpl messenger ); void init(); void dispose(); static final int SLEEP_BETWEEN_ITERATIONS_SEC; }
@Test public void testPurgeExpiredMessage() throws Exception { messageSender.purgeExpiredMessages(); verify( messengerDataService ).purgeExpiredMessages(); }