### Question:
CutoffFacet extends AbstractHierarchicalFacet { @Override public String getSearchValue() { CutoffFacetNode lastNode = this.getHighestTierNode(); if (lastNode == null) { return null; } return lastNode.getSearchValue(); } CutoffFacet(String fieldName, String facetString);  CutoffFacet(String fieldName, String facetString, Long count);  CutoffFacet(String fieldName, List<String> facetStrings, long count);  CutoffFacet(String fieldName, FacetField.Count countObject);  CutoffFacet(CutoffFacet facet); void sortTiers(); void addNode(HierarchicalFacetNode node); void addNode(String searchValue); HierarchicalFacetNode getNode(String searchKey); CutoffFacetNode getHighestTierNode(); int getHighestTier(); @Override String getDisplayValue(); @Override String getSearchKey(); @Override String getSearchValue(); @Override String getPivotValue(); @Override String getLimitToValue(); Integer getCutoff(); void setCutoff(Integer cutoff); Integer getFacetCutoff(); void setFacetCutoff(Integer facetCutoff); @Override Object clone();  }### Answer:
@Test public void createInstance() { FacetField.Count count = mock(FacetField.Count.class); when(count.getCount()).thenReturn(1L); when(count.getName()).thenReturn("1,uuid:a"); List<FacetField.Count> countList = Arrays.asList(count); FacetField facetField = mock(FacetField.class); when(facetField.getValues()).thenReturn(countList); FacetFieldFactory facetFieldFactory = new FacetFieldFactory(); SearchSettings searchSettings = mock(SearchSettings.class); Map<String, Class<?>> facetClasses = new HashMap<String, Class<?>>(); facetClasses.put("ANCESTOR_PATH", CutoffFacet.class); when(searchSettings.getFacetClasses()).thenReturn(facetClasses); facetFieldFactory.setSearchSettings(searchSettings); FacetFieldObject ffo = facetFieldFactory.createFacetFieldObject("ANCESTOR_PATH", facetField); assertTrue(ffo.getValues().get(0) instanceof CutoffFacet); assertEquals("1,uuid:a", ffo.getValues().get(0).getSearchValue()); assertEquals("1,uuid:a", ffo.getValues().get(0).getValue()); assertEquals(1, ffo.getValues().get(0).getCount()); }