@@ -0,0 +1,1981 @@
+%0A%0Apackage com.yahoo.searchdefinition.document;%0A%0Aimport org.junit.Test;%0A%0Aimport static org.hamcrest.core.Is.is;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static com.yahoo.searchdefinition.document.HnswIndexParams.DistanceMetric;%0A%0Apublic class HnswIndexParamsTestCase %7B%0A%0A    @Test%0A    public void override_from() throws Exception %7B%0A        var empty = new HnswIndexParams();%0A        var builder = new HnswIndexParams.Builder();%0A        builder.setMaxLinksPerNode(7);%0A        var one = builder.build();%0A        builder.setDistanceMetric(%22angular%22);%0A        var two = builder.build();%0A        builder.setNeighborsToExploreAtInsert(42);%0A        var three = builder.build();%0A        builder.setMaxLinksPerNode(17);%0A        builder.setDistanceMetric(%22geodegrees%22);%0A        builder.setNeighborsToExploreAtInsert(500);%0A        var four = builder.build();%0A%0A        assertThat(empty.maxLinksPerNode(), is(16));%0A        assertThat(empty.distanceMetric(), is(DistanceMetric.EUCLIDEAN));%0A        assertThat(empty.neighborsToExploreAtInsert(), is(200));%0A%0A        assertThat(one.maxLinksPerNode(), is(7));%0A        assertThat(two.distanceMetric(), is(DistanceMetric.ANGULAR));%0A        assertThat(three.neighborsToExploreAtInsert(), is(42));%0A%0A        assertThat(four.maxLinksPerNode(), is(17));%0A        assertThat(four.distanceMetric(), is(DistanceMetric.GEODEGREES));%0A        assertThat(four.neighborsToExploreAtInsert(), is(500));%0A%0A        var five = four.overrideFrom(empty);%0A        assertThat(five.maxLinksPerNode(), is(17));%0A        assertThat(five.distanceMetric(), is(DistanceMetric.GEODEGREES));%0A        assertThat(five.neighborsToExploreAtInsert(), is(500));%0A%0A        var six = four.overrideFrom(two);%0A        assertThat(six.maxLinksPerNode(), is(7));%0A        assertThat(six.distanceMetric(), is(DistanceMetric.ANGULAR));%0A        assertThat(six.neighborsToExploreAtInsert(), is(500));%0A    %7D%0A%0A%7D%0A

add unit test