Example usage for java.util Calendar FEBRUARY

List of usage examples for java.util Calendar FEBRUARY

Introduction

In this page you can find the example usage for java.util Calendar FEBRUARY.

Prototype

int FEBRUARY

To view the source code for java.util Calendar FEBRUARY.

Click Source Link

Document

Value of the #MONTH field indicating the second month of the year in the Gregorian and Julian calendars.

Usage

From source file:org.kuali.kfs.module.endow.document.service.impl.FrequencyDatesServiceImpl.java

/**
 * This method will check the current month and set the calendar to that month
 * @param month month to set the calendar
 * @return calendar calendar is set to the month selected
 *///from w  ww .  ja  v  a  2s  .  co m
protected Calendar setCalendarWithMonth(String month, Date currentDate) {
    Calendar calendar = Calendar.getInstance();
    calendar.setTime(currentDate);
    int calendarMonth = Calendar.JANUARY;

    if (EndowConstants.FrequencyMonths.JANUARY.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.JANUARY;
    } else if (EndowConstants.FrequencyMonths.FEBRUARY.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.FEBRUARY;
    } else if (EndowConstants.FrequencyMonths.MARCH.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.MARCH;
    } else if (EndowConstants.FrequencyMonths.APRIL.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.APRIL;
    } else if (EndowConstants.FrequencyMonths.MAY.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.MAY;
    } else if (EndowConstants.FrequencyMonths.JUNE.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.JUNE;
    } else if (EndowConstants.FrequencyMonths.JULY.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.JULY;
    } else if (EndowConstants.FrequencyMonths.AUGUST.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.AUGUST;
    } else if (EndowConstants.FrequencyMonths.SEPTEMBER.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.SEPTEMBER;
    } else if (EndowConstants.FrequencyMonths.OCTOBER.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.OCTOBER;
    } else if (EndowConstants.FrequencyMonths.NOVEMBER.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.NOVEMBER;
    } else if (EndowConstants.FrequencyMonths.DECEMBER.equalsIgnoreCase(month)) {
        calendarMonth = Calendar.DECEMBER;
    }

    calendar.set(Calendar.MONTH, calendarMonth);

    return calendar;
}

From source file:it.caladyon.akka.molla.topology.Test_TimedListenerActor.java

/**
 *//*from  w  ww.  j  av a 2s . c o  m*/
@Ignore
@Test
public void test_3() {
    log.info("---- test 3 -------------------------------");

    // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter
    final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system);
    final Props props = springExtProvider.props(LISTENER_BEAN_NAME);
    final TestActorRef<TestTimedListenerActor> ref = TestActorRef.create(system, props, "test_3");
    final TestTimedListenerActor actor = ref.underlyingActor();

    try {
        List<Date> rd = new ArrayList<Date>();
        List<MessageWrapper> mv = new ArrayList<MessageWrapper>();
        List<Future<Object>> f = new ArrayList<Future<Object>>();
        int c = 0;
        int m = 0;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        try {
            Thread.sleep(WAIT + 100);
        } catch (InterruptedException e1) {
            e1.printStackTrace();
        }

        for (int i = 0; i < f.size(); ++i) {
            assertTrue("future " + i, f.get(i).isCompleted());
        }

        try {
            int r = 3;
            assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));
            r = 6;
            assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));
        } catch (Exception e) {
            e.printStackTrace();
        }

        assertTrue("execution count", actor.getExecCount() == 2);
        assertTrue("input size: " + actor.inputsSize(), actor.inputsSize() == 0);
    } finally {
        ref.stop();
    }
}

From source file:gbc.jtimecalc.AbstractTimeDifferenceCalculatorTest.java

public void shouldReturn30Days1Hour0Minutes0seconds() {
    Calendar end = prepareCalendar(2006, Calendar.FEBRUARY, 1, 1, 0, 0, 0);
    // 1.02.2006 01:00:00.0
    setEndTime(end.getTimeInMillis());/* w  w w  .  ja  v a2  s. com*/

    Calendar start = (Calendar) end.clone();
    start.add(Calendar.DATE, -30);
    start.add(Calendar.HOUR, -1);
    setStartTime(start.getTimeInMillis());
    // 2.01.2006 00:00:00.0
    expectedValue = messages.get("30Days1Hour");
}

From source file:br.msf.commons.util.AbstractDateUtils.java

public static void main(String[] args) {
    Age age;/*from   www.  j  a  v  a  2  s. c  o m*/
    Calendar c1, c2;

    c1 = new GregorianCalendar(2012, Calendar.JANUARY, 1);
    c2 = new GregorianCalendar(2012, Calendar.JANUARY, 1);
    age = getAge(c1, c2);
    System.out.println(age);

    c1 = new GregorianCalendar(2012, Calendar.JANUARY, 1);
    c2 = new GregorianCalendar(2012, Calendar.FEBRUARY, 1);
    age = getAge(c1, c2);
    System.out.println(age);

    c1 = new GregorianCalendar(2012, Calendar.JANUARY, 1);
    c2 = Calendar.getInstance();
    age = getAge(c1, c2);
    System.out.println(age);
}

From source file:it.caladyon.akka.molla.topology.help.Test_StrategistListenerActor_with_TimedListening.java

/**
 * @throws Exception//from  ww w .j a  v a2 s  .co  m
 */
@SuppressWarnings("deprecation")
@Test
public void test_3() throws Exception {
    log.info("---- test 3 -------------------------------");

    // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter
    final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system);
    final Props props = springExtProvider.props(LISTENER_BEAN_NAME);
    final TestActorRef<TestTimedListenerActor> ref = TestActorRef.create(system, props, "test_3");
    final TestTimedListenerActor actor = ref.underlyingActor();

    try {
        List<Date> rd = new ArrayList<Date>();
        List<MessageWrapper> mv = new ArrayList<MessageWrapper>();
        List<Future<Object>> f = new ArrayList<Future<Object>>();
        int c = 0;
        int m = 0;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        try {
            Thread.sleep(WAIT + 100);
        } catch (InterruptedException e1) {
            e1.printStackTrace();
        }

        for (int i = 0; i < f.size(); ++i) {
            assertTrue("future " + i, f.get(i).isCompleted());
        }

        int r = 3;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));
        r = 6;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));

        assertTrue("execution count", actor.getExecCount() == 2);
        int inputsSize = ((TimedListening) actor.getListening()).inputs.size();
        assertTrue("input size: " + inputsSize, inputsSize == 0);
    } finally {
        ref.stop();
    }
}

From source file:org.kuali.kfs.module.endow.businessobject.lookup.CalculateProcessDateUsingFrequencyCodeService.java

/**
 * This method will check the current month and set the calendar to that month
 * @param month, dayOfMonth month to set the calendar, dayOfMonth day of the month to set to
 * @return calendar calendar is set to the month selected
 *//*from   ww w .ja v a2s.co  m*/
protected void setCalendarWithDays(Calendar calendar, String dayOfMonth) {
    int dayInMonthToSet;
    int calendarMonth = calendar.get(Calendar.MONTH);

    if (StringUtils.equalsIgnoreCase(dayOfMonth, EndowConstants.FrequencyMonthly.MONTH_END)) { // month end for the month so need to get max days...
        dayInMonthToSet = checkMaximumDaysInMonth(calendar.get(Calendar.MONTH));
    } else {
        dayInMonthToSet = Integer.parseInt(dayOfMonth);

        if (dayInMonthToSet > 29 && calendarMonth == Calendar.FEBRUARY) {
            dayInMonthToSet = checkMaximumDaysInFebruary();
        } else if (dayInMonthToSet > 30 && (calendarMonth == Calendar.APRIL || calendarMonth == Calendar.JUNE
                || calendarMonth == Calendar.SEPTEMBER || calendarMonth == Calendar.NOVEMBER)) {
            dayInMonthToSet = 30;
            dayInMonthToSet = checkMaximumDaysInMonth(calendarMonth);
        }
    }

    calendar.set(Calendar.DAY_OF_MONTH, dayInMonthToSet);
}

From source file:it.caladyon.akka.molla.topology.Test_TolerantTimedListenerActor_1.java

/**
 * @throws Exception/*from ww w .j a  v a  2 s . co  m*/
 */
@Ignore
@Test
public void test_3() throws Exception {
    log.info("---- test 3 -------------------------------");

    // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter
    final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system);
    final Props props = springExtProvider.props(LISTENER_BEAN_NAME);
    final TestActorRef<TestTimedListenerActor> ref = TestActorRef.create(system, props, "test_3");
    final TestTimedListenerActor actor = ref.underlyingActor();

    try {
        List<Date> rd = new ArrayList<Date>();
        List<MessageWrapper> mv = new ArrayList<MessageWrapper>();
        List<Future<Object>> f = new ArrayList<Future<Object>>();
        int c = 0;
        int m = 0;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        try {
            Thread.sleep(WAIT + 100);
        } catch (InterruptedException e1) {
            e1.printStackTrace();
        }

        for (int i = 0; i < f.size(); ++i) {
            assertTrue("future " + i, f.get(i).isCompleted());
        }

        int r = 2;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));
        r = 6;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));

        assertTrue("execution count", actor.getExecCount() == 2);
        assertTrue("input size: " + actor.inputsSize(), actor.inputsSize() == 0);
    } finally {
        ref.stop();
    }
}

From source file:it.caladyon.akka.molla.topology.Test_TolerantTimedListenerActor_0.java

/**
 * @throws Exception//from  w  w w.  ja  v a2s  .  c o m
 */
@Ignore
@Test
public void test_3() throws Exception {
    log.info("---- test 3 -------------------------------");

    // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter
    final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system);
    final Props props = springExtProvider.props(LISTENER_BEAN_NAME);
    final TestActorRef<TestTimedListenerActor> ref = TestActorRef.create(system, props, "test_3");
    final TestTimedListenerActor actor = ref.underlyingActor();

    try {
        List<Date> rd = new ArrayList<Date>();
        List<MessageWrapper> mv = new ArrayList<MessageWrapper>();
        List<Future<Object>> f = new ArrayList<Future<Object>>();
        int c = 0;
        int m = 0;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        try {
            Thread.sleep(WAIT + 100);
        } catch (InterruptedException e1) {
            e1.printStackTrace();
        }

        for (int i = 0; i < f.size(); ++i) {
            assertTrue("future " + i, f.get(i).isCompleted());
        }

        int r = 3;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));
        r = 6;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));

        assertTrue("execution count", actor.getExecCount() == 2);
        assertTrue("input size: " + actor.inputsSize(), actor.inputsSize() == 0);
    } finally {
        ref.stop();
    }
}

From source file:it.caladyon.akka.molla.topology.help.Test_StrategistListenerActor_with_TolerantTimedListening_0.java

/**
 * @throws Exception//  ww  w.j av a 2  s .  co  m
 */
@SuppressWarnings("deprecation")
@Test
public void test_3() throws Exception {
    log.info("---- test 3 -------------------------------");

    // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter
    final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system);
    final Props props = springExtProvider.props(LISTENER_BEAN_NAME);
    final TestActorRef<TestTolerantListenerActor> ref = TestActorRef.create(system, props, "test_3");
    final TestTolerantListenerActor actor = ref.underlyingActor();

    try {
        List<Date> rd = new ArrayList<Date>();
        List<MessageWrapper> mv = new ArrayList<MessageWrapper>();
        List<Future<Object>> f = new ArrayList<Future<Object>>();
        int c = 0;
        int m = 0;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, m, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(c), "message-" + c));
        f.add(ask(ref, mv.get(c), TIMEOUT));
        ++c;
        ++m;

        try {
            Thread.sleep(WAIT + 100);
        } catch (InterruptedException e1) {
            e1.printStackTrace();
        }

        for (int i = 0; i < f.size(); ++i) {
            assertTrue("future " + i, f.get(i).isCompleted());
        }

        int r = 3;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));
        r = 6;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));

        assertTrue("execution count", actor.getExecCount() == 2);
        int inputsSize = ((TolerantTimedListening) actor.getListening()).inputs.size();
        assertTrue("input size: " + inputsSize, inputsSize == 0);
    } finally {
        ref.stop();
    }
}

From source file:it.caladyon.akka.molla.topology.help.Test_StrategistListenerActor_with_TolerantTimedListening_1.java

/**
 * @throws Exception//from w  ww.ja  va2  s.c  o m
 */
@SuppressWarnings("deprecation")
@Test
public void test_3() throws Exception {
    log.info("---- test 3 -------------------------------");

    // questo metodo di creazione delle Props e' ripreso da ActorSystemStarter
    final SpringExt springExtProvider = SpringExtensionProvider.springExtProvider.get(system);
    final Props props = springExtProvider.props(LISTENER_BEAN_NAME);
    final TestActorRef<TestTolerantListenerActor> ref = TestActorRef.create(system, props, "test_3");
    final TestTolerantListenerActor actor = ref.underlyingActor();

    try {
        List<Date> rd = new ArrayList<Date>();
        List<MessageWrapper> mv = new ArrayList<MessageWrapper>();
        List<Future<Object>> f = new ArrayList<Future<Object>>();
        int count = 0;
        int minute = 0;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, minute, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(count), "message-" + count));
        f.add(ask(ref, mv.get(count), TIMEOUT));
        ++count;
        ++minute;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, minute, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(count), "message-" + count));
        f.add(ask(ref, mv.get(count), TIMEOUT));
        ++count;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, minute, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(count), "message-" + count));
        f.add(ask(ref, mv.get(count), TIMEOUT));
        ++count;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, minute, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(count), "message-" + count));
        f.add(ask(ref, mv.get(count), TIMEOUT));
        ++count;
        ++minute;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, minute, 30));
        mv.add(new MessageWrapper(SOURCE3_BEAN_NAME, rd.get(count), "message-" + count));
        f.add(ask(ref, mv.get(count), TIMEOUT));
        ++count;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, minute, 10));
        mv.add(new MessageWrapper(SOURCE1_BEAN_NAME, rd.get(count), "message-" + count));
        f.add(ask(ref, mv.get(count), TIMEOUT));
        ++count;

        rd.add(new Date(2015, Calendar.FEBRUARY, 19, 17, minute, 20));
        mv.add(new MessageWrapper(SOURCE2_BEAN_NAME, rd.get(count), "message-" + count));
        f.add(ask(ref, mv.get(count), TIMEOUT));
        ++count;
        ++minute;

        try {
            Thread.sleep(WAIT + 100);
        } catch (InterruptedException e1) {
            e1.printStackTrace();
        }

        for (int i = 0; i < f.size(); ++i) {
            assertTrue("future " + i, f.get(i).isCompleted());
        }

        int r = 2;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));
        r = 6;
        assertTrue("response+" + r, Await.result(f.get(r), Duration.Zero()) == rd.get(r));

        assertTrue("execution count", actor.getExecCount() == 2);
        int inputsSize = ((TolerantTimedListening) actor.getListening()).inputs.size();
        assertTrue("input size: " + inputsSize, inputsSize == 0);
    } finally {
        ref.stop();
    }
}