@@ -0,0 +1,2413 @@
+package org.paradise.ipaq.integration;%0A%0Aimport au.com.auspost.signing.aws.KmsEncryption;%0Aimport org.springframework.beans.factory.annotation.Value;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.context.annotation.Configuration;%0Aimport org.springframework.data.redis.connection.RedisConnection;%0Aimport org.springframework.data.redis.connection.RedisConnectionFactory;%0Aimport org.springframework.data.redis.core.StringRedisTemplate;%0Aimport org.springframework.data.redis.core.ValueOperations;%0A%0Aimport java.io.IOException;%0A%0Aimport static org.mockito.Matchers.any;%0Aimport static org.mockito.Matchers.anyString;%0Aimport static org.mockito.Matchers.eq;%0Aimport static org.mockito.Mockito.doNothing;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.when;%0A%0A/**%0A * Created by terrence on 26/5/17.%0A */%0A@Configuration%0Apublic class IntegrationConfig %7B%0A%0A    public static final String ENCRYPTED_PERSISTED_VALUE = %22Encrypted persisted value%22;%0A%0A    @Value(%22$%7Bapp.encryptionKey.arn%7D%22)%0A    private String arn;%0A%0A    @Bean%0A    public RedisConnectionFactory connectionFactory() %7B%0A%0A        RedisConnectionFactory redisConnectionFactory = mock(RedisConnectionFactory.class);%0A        RedisConnection redisConnection = mock(RedisConnection.class);%0A%0A        when(redisConnectionFactory.getConnection()).thenReturn(redisConnection);%0A%0A        return redisConnectionFactory;%0A    %7D%0A%0A    @Bean%0A    public StringRedisTemplate stringRedisTemplate() %7B%0A%0A        StringRedisTemplate stringRedisTemplate = mock(StringRedisTemplate.class);%0A        ValueOperations%3CString, String%3E valueOperations = mock(ValueOperations.class);%0A%0A        when(stringRedisTemplate.opsForValue()).thenReturn(valueOperations);%0A%0A        doNothing().when(valueOperations).set(any(String.class), any(String.class));%0A%0A        when(valueOperations.get(eq(AbstractIntegrationTest.TOKEN))).thenReturn(ENCRYPTED_PERSISTED_VALUE);%0A        when(valueOperations.get(eq(AbstractIntegrationTest.BEARER))).thenReturn(ENCRYPTED_PERSISTED_VALUE);%0A%0A        doNothing().when(stringRedisTemplate).delete(anyString());%0A%0A        return stringRedisTemplate;%0A    %7D%0A%0A    @Bean%0A    public KmsEncryption kmsEncryption() throws IOException %7B%0A%0A        KmsEncryption kmsEncryption = mock(KmsEncryption.class);%0A%0A        when(kmsEncryption.encrypt(any(String.class))).thenReturn(ENCRYPTED_PERSISTED_VALUE);%0A%0A        return kmsEncryption;%0A    %7D%0A%0A%7D%0A

Add IntegrationConfig