@@ -0,0 +1,1416 @@
+package de.retest.recheck.review.ignore.io;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Aimport java.util.Optional;%0Aimport java.util.stream.Stream;%0A%0Aimport org.junit.jupiter.api.BeforeEach;%0Aimport org.junit.jupiter.api.Test;%0A%0Aclass LoaderTest %7B%0A%0A%09Loader%3CString%3E cut;%0A%0A%09@BeforeEach%0A%09void setUp() %7B%0A%09%09cut = new StringLoader();%0A%09%7D%0A%0A%09@Test%0A%09void load_should_return_string() throws Exception %7B%0A%09%09assertThat( cut.load( %22foo%22 ) ).hasValue( %22foo%22 );%0A%09%7D%0A%0A%09@Test%0A%09void load_should_return_empty_when_ignore() throws Exception %7B%0A%09%09assertThat( cut.load( %22ignore%22 ) ).isNotPresent();%0A%09%7D%0A%0A%09@Test%0A%09void save_should_return_the_same_string() throws Exception %7B%0A%09%09assertThat( cut.save( %22foo%22 ) ).isEqualTo( %22foo%22 );%0A%09%09assertThat( cut.save( %22ignore%22 ) ).isEqualTo( %22ignore%22 );%0A%09%7D%0A%0A%09@Test%0A%09void load_should_properly_ignore_failed_attempts() throws Exception %7B%0A%09%09assertThat( cut.load( Stream.of( %22foo%22, %22ignore%22, %22bar%22 ) ) ).contains( %22foo%22, %22bar%22 );%0A%09%7D%0A%0A%09@Test%0A%09void save_with_stream_should_properly_delegate() throws Exception %7B%0A%09%09assertThat( cut.save( Stream.of( %22foo%22, %22ignore%22, %22bar%22 ) ) ).contains( %22foo%22, %22ignore%22, %22bar%22 );%0A%09%7D%0A%0A%09static class StringLoader implements Loader%3CString%3E %7B%0A%0A%09%09@Override%0A%09%09public Optional%3CString%3E load( final String line ) %7B%0A%09%09%09return line.equals( %22ignore%22 ) ? Optional.empty() : Optional.of( line );%0A%09%09%7D%0A%0A%09%09@Override%0A%09%09public String save( final String ignore ) %7B%0A%09%09%09return ignore;%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add test for default loader methods