@Before
	@SuppressWarnings("unchecked")
	public void setUp() throws Exception {
		template = new RedisRetryTemplate<String, String>();
		template.setConnectionFactory(connectionFactoryMock);
		when(connectionFactoryMock.getConnection()).thenReturn(redisConnectionMock);
		doReturn(true).when(retryListenerMock).open(any(RetryContext.class), any(RetryCallback.class));
		doNothing().when(retryListenerMock)
				.onError(any(RetryContext.class), any(RetryCallback.class), any(Throwable.class));
		doNothing().when(retryListenerMock).close(any(RetryContext.class), any(RetryCallback.class), any(Throwable.class));
		when(recoveryCallback.recover(any(RetryContext.class))).thenReturn(null);
		template.afterPropertiesSet();
	}
@author Christoph Strobl
@author Thomas Darimont
spring-xd-analytics/src/test/java/org/springframework/xd/analytics/metrics/redis/RedisRetryTemplateTests.java