sel.addValue("001");
sel.addValue("003");
sel.addValue("007");
br.addSelection(sel);
FacetSpec ospec=new FacetSpec();
br.setFacetSpec("compactnum", ospec);
br.setSort(new SortField[]{new SortField("compactnum",SortField.CUSTOM,true)});
HashMap<String,List<BrowseFacet>> answer=new HashMap<String,List<BrowseFacet>>();
answer.put("compactnum", Arrays.asList(new BrowseFacet[]{new BrowseFacet("001",3),new BrowseFacet("002",1),new BrowseFacet("003",3),new BrowseFacet("007",2),new BrowseFacet("008",1),new BrowseFacet("012",1)}));
doTest(br,6,answer,new String[]{"3","7","4","6","1","5"});
br=new BrowseRequest();
br.setCount(10);
br.setOffset(0);
sel=new BrowseSelection("compactnum");
sel.addValue("001");
sel.addValue("002");
sel.addValue("003");
br.addSelection(sel);
sel.setSelectionOperation(ValueOperation.ValueOperationAnd);
doTest(br,1,null,new String[]{"6"});
br=new BrowseRequest();
br.setCount(10);
br.setOffset(0);
sel=new BrowseSelection("compactnum");
sel.addValue("001");
sel.addValue("003");
sel.addValue("008");
sel.setSelectionOperation(ValueOperation.ValueOperationOr);
br.addSelection(sel);
sel=new BrowseSelection("color");
sel.addValue("red");
br.addSelection(sel);
ospec=new FacetSpec();
br.setFacetSpec("color", ospec);
ospec=new FacetSpec();
br.setFacetSpec("compactnum",ospec);
answer=new HashMap<String,List<BrowseFacet>>();
answer.put("compactnum", Arrays.asList(new BrowseFacet[]{new BrowseFacet("001",1),new BrowseFacet("003",2),new BrowseFacet("008",1)}));
answer.put("color", Arrays.asList(new BrowseFacet[]{new BrowseFacet("red",2)}));