@Test
public void testModuleSearch() {

    List<String> moduleIds  = new ArrayList<>();
    moduleIds.add("test_id_1");
    moduleIds.add("test_id_2");
    List<String> artifactIds  = new ArrayList<>();
    artifactIds.add("test_artifact_id_1");
    artifactIds.add("test_artifact_id_2");
    DbSearch filterModules = new DbSearch();
    filterModules.setModules(moduleIds);
    DbSearch filterArtifacts = new DbSearch();
    filterArtifacts.setArtifacts(artifactIds);
    SearchFilter filter = new SearchFilter(false, true);
    assertTrue(filter.filter(filterModules));
    assertFalse(filter.filter(filterArtifacts));
    filter = new SearchFilter(true, false);
    assertTrue(filter.filter(filterArtifacts));
    assertFalse(filter.filter(filterModules));
    filter = new SearchFilter(false, false);
    assertFalse(filter.filter(filterArtifacts));
    assertFalse(filter.filter(filterModules));
}