{
BrowseRequest br=new BrowseRequest();
br.setCount(10);
br.setOffset(0);
BrowseSelection sel=new BrowseSelection("color");
sel.addValue("red");
br.addSelection(sel);
FacetSpec output=new FacetSpec();
output.setExpandSelection(true);
br.setFacetSpec("color", output);
br.setFacetSpec("shape", output);
HashMap<String,List<BrowseFacet>> answer=new HashMap<String,List<BrowseFacet>>();
answer.put("color", Arrays.asList(new BrowseFacet[]{new BrowseFacet("blue",2),new BrowseFacet("green",2),new BrowseFacet("red",3)}));
answer.put("shape", Arrays.asList(new BrowseFacet[]{new BrowseFacet("rectangle",1),new BrowseFacet("square",2)}));
doTest(br,3,answer,new String[]{"1","2","7"});
sel=new BrowseSelection("shape");
sel.addValue("square");
br.addSelection(sel);
answer=new HashMap<String,List<BrowseFacet>>();
answer.put("color", Arrays.asList(new BrowseFacet[]{new BrowseFacet("blue",1),new BrowseFacet("red",2)}));
answer.put("shape", Arrays.asList(new BrowseFacet[]{new BrowseFacet("rectangle",1),new BrowseFacet("square",2)}));