facetManager.enableFaceting( ccsFacetRequest );
assertEquals( "Wrong number of query matches", 50, query.getResultSize() );
assertFacetCounts( facetManager.getFacets( colorFacetName ), new int[] { 12, 12, 12, 12, 2 } );
assertFacetCounts( facetManager.getFacets( ccsFacetName ), new int[] { 17, 16, 16, 1 } );
Facet colorFacet = facetManager.getFacets( colorFacetName ).get( 0 );
facetManager.getFacetGroup( colorFacetName ).selectFacets( colorFacet );
assertFacetCounts( facetManager.getFacets( colorFacetName ), new int[] { 12, 0, 0, 0, 0 } );
assertFacetCounts( facetManager.getFacets( ccsFacetName ), new int[] { 4, 4, 4, 0 } );
Facet ccsFacet = facetManager.getFacets( ccsFacetName ).get( 0 );
facetManager.getFacetGroup( colorFacetName ).selectFacets( colorFacet );
facetManager.getFacetGroup( ccsFacetName ).selectFacets( ccsFacet );
assertFacetCounts( facetManager.getFacets( colorFacetName ), new int[] { 4, 0, 0, 0, 0 } );
assertFacetCounts( facetManager.getFacets( ccsFacetName ), new int[] { 4, 0, 0, 0 } );