@Test
	public void testCountWithTimestampInMessageAndCustomFormat() {
		applicationContext = new AnnotationConfigApplicationContext(
				WithTimefieldAggregateCounterTestsConfig.class);

		input().send(new GenericMessage<Object>(Collections.singletonMap("ts", "14/10/1978")));

		DateTime from = new DateTime(1980, 1, 1, 0, 0);

		AggregateCount counts = repository().getCounts("foo", 5, from, AggregateCountResolution.year);
		assertThat(counts.getCounts(), equalTo(new long[] { 0, 0, 1, 0, 0 }));
	}
Tests the aggregate-counter module.

@author Eric Bottard
spring-xd-analytics/src/test/java/org/springframework/xd/analytics/metrics/integration/AggregateCounterTests.java