@@ -0,0 +1,1833 @@
+package de.retest.recheck.ui.diff;%0A%0Aimport static de.retest.recheck.ui.diff.ElementDifferenceFinder.getNonEmptyDifferences;%0Aimport static java.util.Collections.singletonList;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.mockito.Mockito.mock;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport org.junit.Test;%0A%0Aimport de.retest.recheck.ui.descriptors.Element;%0A%0Apublic class ElementDifferenceFinderTest %7B%0A%0A%09@Test%0A%09public void getNonEmptyDifferences_should_be_robust() %7B%0A%09%09getNonEmptyDifferences( null );%0A%09%09getNonEmptyDifferences( new ArrayList%3C%3E() );%0A%09%7D%0A%0A%09@Test%0A%09public void getNonEmptyDifferences_should_handle_empty_element_diffs() %7B%0A%09%09final List%3CDifference%3E empty = new ArrayList%3C%3E();%0A%09%09empty.add( new ElementDifference() );%0A%09%09assertThat( getNonEmptyDifferences( empty ) ).hasSize( 0 );%0A%09%7D%0A%0A%09@Test%0A%09public void getNonEmptyDifferences_should_ignore_attribute_diffs() %7B%0A%09%09final List%3CAttributeDifference%3E attributeDiff = new ArrayList%3C%3E();%0A%09%09attributeDiff.add( new AttributeDifference( %22text%22, %22Mark%22, %22Karl%22 ) );%0A%09%09final AttributesDifference attributeDifference = new AttributesDifference( attributeDiff );%0A%09%09assertThat( getNonEmptyDifferences( singletonList( attributeDifference ) ) ).hasSize( 0 );%0A%09%7D%0A%0A%09@Test%0A%09public void getNonEmptyDifferences_should_return_nonempty_differences() throws Exception %7B%0A%09%09final List%3CAttributeDifference%3E attributeDiff = new ArrayList%3C%3E();%0A%09%09attributeDiff.add( new AttributeDifference( %22text%22, %22Mark%22, %22Karl%22 ) );%0A%09%09final AttributesDifference attributeDifference = new AttributesDifference( attributeDiff );%0A%09%09final List%3CDifference%3E nonempty = new ArrayList%3C%3E();%0A%09%09nonempty.add( new ElementDifference( mock( Element.class ), attributeDifference, null, null, null,%0A%09%09%09%09new ArrayList%3C%3E() ) );%0A%09%09assertThat( getNonEmptyDifferences( nonempty ) ).hasSize( 1 );%0A%09%7D%0A%0A%7D%0A

Add test and move easy to move methods...