### Question:
MultivaluedHierarchicalFacet extends AbstractHierarchicalFacet { public boolean contains(MultivaluedHierarchicalFacet facet) { if (facet.facetNodes.size() > this.facetNodes.size()) { return false; } for (int i = 0; i < facet.facetNodes.size(); i++) { if (!facet.facetNodes.get(i).getSearchKey().equals(this.facetNodes.get(i).getSearchKey())) { return false; } } return true; } MultivaluedHierarchicalFacet(String fieldName, String facetString);  MultivaluedHierarchicalFacet(String fieldName, FacetField.Count countObject);  MultivaluedHierarchicalFacet(String fieldName);  MultivaluedHierarchicalFacet(MultivaluedHierarchicalFacet facet); static List<MultivaluedHierarchicalFacet> createMultivaluedHierarchicalFacets(String fieldName,
            List<String> facetValues); void sortTiers(); HierarchicalFacetNode getNode(String searchKey); HierarchicalFacetNode getNodeBySearchValue(String searchValue); boolean contains(MultivaluedHierarchicalFacet facet); void setDisplayValues(MultivaluedHierarchicalFacet facet); @Override String getSearchKey(); @Override String getSearchValue(); @Override String getDisplayValue(); @Override String getPivotValue(); @Override String getLimitToValue(); @Override Object clone();  }### Answer:
@Test public void containsTest() { List<MultivaluedHierarchicalFacet> facets = MultivaluedHierarchicalFacet .createMultivaluedHierarchicalFacets(null, Arrays.asList("^image,Image", "/image^jpg,jpg")); MultivaluedHierarchicalFacet facet1 = facets.get(0); facets = MultivaluedHierarchicalFacet .createMultivaluedHierarchicalFacets(null, Arrays.asList("^image")); MultivaluedHierarchicalFacet facet2 = facets.get(0); assertTrue(facet1.contains(facet2)); }