@Test
public void testBuildSearchPolicy() {

    params.setMaxDepth(5);
    params.setSimilarNamesDistance(2);
    params.setExactMatchMaxLevel(3);
    params.setExactMatchForSingleSuccess(true);
    SearchPolicy searchPolicy = params.buildSearchPolicy();
    assertThat(searchPolicy).isNotNull();
    assertThat(((DefaultSearchDepthPolicy) searchPolicy.getSearchDepthPolicy()).getMaximumDepth()).isEqualTo(5);
    assertThat(((DefaultSimilarNamesPolicy) searchPolicy.getSimilarNamesPolicy()).getSimilarNamesDistance())
            .isEqualTo(2);
    assertThat(((DefaultExactMatchPolicy) searchPolicy.getExactMatchPolicy()).getExactMatchMaxLevel()).isEqualTo(3);
    assertThat(((DefaultExactMatchPolicy) searchPolicy.getExactMatchPolicy()).isExactMatchForSingleSuccess())
            .isEqualTo(true);
}