@@ -0,0 +1,1610 @@
+%0Apackage com.uwetrottmann.shopr.algorithm.test;%0A%0Aimport static org.fest.assertions.api.Assertions.assertThat;%0A%0Aimport com.uwetrottmann.shopr.algorithm.AdaptiveSelection;%0A%0Aimport org.junit.Test;%0A%0Apublic class AdaptiveSelectionTest %7B%0A%0A    @Test%0A    public void testLikeValue() %7B%0A        // all equal%0A        double%5B%5D actual = new double%5B%5D %7B%0A                0.25, 0.25, 0.25, 0.25%0A        %7D;%0A        double%5B%5D expected = new double%5B%5D %7B%0A                0.25 - 0.25 / 3, 0.5, 0.25 - 0.25 / 3, 0.25 - 0.25 / 3%0A        %7D;%0A        AdaptiveSelection.likeValue(1, actual);%0A        assertThat(actual).isEqualTo(expected);%0A%0A        // one getting bigger than zero%0A        actual = new double%5B%5D %7B%0A                0.4 / 3, 0.6, 0.4 / 3, 0.4 / 3%0A        %7D;%0A        expected = new double%5B%5D %7B%0A                0.0, 1.0, 0.0, 0.0%0A        %7D;%0A        AdaptiveSelection.likeValue(1, actual);%0A        assertThat(actual).isEqualTo(expected);%0A    %7D%0A%0A    @Test%0A    public void testdislikeValue() %7B%0A        // all equal%0A        double%5B%5D actual = new double%5B%5D %7B%0A                0.25, 0.25, 0.25, 0.25%0A        %7D;%0A        double%5B%5D expected = new double%5B%5D %7B%0A                0.25 + 0.25 / 3, 0.0, 0.25 + 0.25 / 3, 0.25 + 0.25 / 3%0A        %7D;%0A        AdaptiveSelection.dislikeValue(1, actual);%0A        assertThat(actual).isEqualTo(expected);%0A%0A        // two zero, keep them zero%0A        actual = new double%5B%5D %7B%0A                0.0, 0.5, 0.0, 0.5%0A        %7D;%0A        expected = new double%5B%5D %7B%0A                0.0, 0.0, 0.0, 1.0%0A        %7D;%0A        AdaptiveSelection.dislikeValue(1, actual);%0A        assertThat(actual).isEqualTo(expected);%0A    %7D%0A%0A%7D%0A

Add tests for likeValue and dislikeValue.