@Test
	public void test66MinuteCount() throws Exception {
		final DateTime start = new DateTime(2013, 6, 28, 23, 0, 0, 0);
		final DateTime end = start.plusMinutes(66);
		DateTime now = start;
		int val = 1;
		while (now.isBefore(end)) {
			aggregateCounterRepository.increment(counterName, val++, now);
			now = now.plus(Duration.standardMinutes(1));
		}
		// Include 66th minute's value
		aggregateCounterRepository.increment(counterName, val++, now);
		long[] counts = aggregateCounterRepository.getCounts(counterName, new Interval(start, end), AggregateCountResolution.minute).getCounts();
		// the counts.length should be 66 + 1 to include the 66th minute's count
		assertEquals(67, counts.length);
		assertEquals(1, counts[0]);
		assertEquals(66, counts[65]);
		assertEquals(67, counts[66]);
	}
@author Luke Taylor
@author Gary Russell
@author Ilayaperumal Gopinathan
spring-xd-analytics/src/test/java/org/springframework/xd/analytics/metrics/AbstractAggregateCounterTests.java