@@ -0,0 +1,2221 @@
+package de.tblsoft.solr.compare;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A/**%0A * Created by tblsoft on 21.07.17.%0A */%0Apublic class SearchResultDiffTest %7B%0A%0A%0A    @Test%0A    public void testEqualResults() %7B%0A        SearchResult reference = createSearchResult();%0A        SearchResult test = createSearchResult();;%0A        SearchResultDiff searchResultDiff = new SearchResultDiff(reference, test);%0A        searchResultDiff.compute();%0A%0A        Assert.assertEquals(0.0, searchResultDiff.getNumFoundRelative(), 0.0);%0A        Assert.assertEquals(0, searchResultDiff.getNumFoundTotal());%0A        Assert.assertEquals(0, searchResultDiff.getPositions());%0A        Assert.assertEquals(0, searchResultDiff.getPositionChangedCount());%0A        Assert.assertEquals(0.0, searchResultDiff.getResponseTimeRelative(), 0.0);%0A        Assert.assertEquals(0.0, searchResultDiff.getResponseTimeTotal(), 0.0);%0A    %7D%0A%0A    @Test%0A    public void testDifflResults() %7B%0A        SearchResult reference = createSearchResult();%0A        reference.getResultList().get(0).setId(%220816%22);%0A        reference.getResultList().get(5).setId(%220815%22);%0A        SearchResult test = createSearchResult();%0A%0A        test.getResultList().get(0).setId(%220815%22);%0A        test.getResultList().get(5).setId(%220816%22);%0A        test.setResponseTime(1100);%0A        SearchResultDiff searchResultDiff = new SearchResultDiff(reference, test);%0A        searchResultDiff.compute();%0A%0A        Assert.assertEquals(0.0, searchResultDiff.getNumFoundRelative(), 0.0);%0A        Assert.assertEquals(0, searchResultDiff.getNumFoundTotal());%0A        Assert.assertEquals(10, searchResultDiff.getPositions());%0A        Assert.assertEquals(2, searchResultDiff.getPositionChangedCount());%0A        Assert.assertEquals(10.0, searchResultDiff.getResponseTimeRelative(), 0.0);%0A        Assert.assertEquals(100, searchResultDiff.getResponseTimeTotal());%0A%0A    %7D%0A%0A    SearchResult createSearchResult() %7B%0A        SearchResult searchResult = new SearchResult();%0A        searchResult.setResponseTime(1000);%0A        searchResult.setNumFound(100);%0A        for (int i = 0; i %3C 72; i++) %7B%0A            searchResult.getResultList().add(new Result(String.valueOf(i), i));%0A        %7D%0A        return searchResult;%0A    %7D%0A%7D%0A

add a unit test for search result diff tool