@@ -0,0 +1,1729 @@
+package eu.hinsch.spring.propertiesdecrypter;%0A%0Aimport org.jasypt.exceptions.EncryptionOperationNotPossibleException;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ExpectedException;%0Aimport org.springframework.boot.SpringApplication;%0Aimport org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;%0Aimport org.springframework.core.env.PropertiesPropertySource;%0Aimport org.springframework.core.env.StandardEnvironment;%0A%0Aimport java.util.Properties;%0A%0Aimport static org.hamcrest.Matchers.isA;%0A%0A/**%0A * Created by lh on 27/06/15.%0A */%0Apublic class DecryptingPropertiesApplicationListenerTest %7B%0A%0A    @Rule%0A    public ExpectedException exception = ExpectedException.none();%0A%0A    private final DecryptingPropertiesApplicationListener listener = new DecryptingPropertiesApplicationListener();%0A%0A    @Test%0A    public void shouldWrapExceptionOnEncryptionError() %7B%0A        // given%0A        StandardEnvironment environment = new StandardEnvironment();%0A        Properties props = new Properties();%0A        props.put(%22propertyDecryption.password%22, %22NOT-A-PASSWORD%22);%0A        props.put(%22someProperty%22, %22%7Bencrypted%7DNOT-ENCRYPTED%22);%0A        environment.getPropertySources().addFirst(new PropertiesPropertySource(%22test-env%22, props));%0A%0A        exception.expect(RuntimeException.class);%0A        exception.expectMessage(%22Unable to decrypt property value '%7Bencrypted%7DNOT-ENCRYPTED'%22);%0A        exception.expectCause(isA(EncryptionOperationNotPossibleException.class));%0A%0A        ApplicationEnvironmentPreparedEvent event = new ApplicationEnvironmentPreparedEvent(new SpringApplication(), new String%5B0%5D, environment);%0A%0A        // when%0A        listener.onApplicationEvent(event);%0A%0A        // then -%3E exception%0A    %7D%0A%7D%0A

Add test case for error handling