### Question:
SetStatusTagsFilter implements IndexDocumentFilter { @Override public void filter(DocumentIndexingPackage dip) throws IndexingException { IndexDocumentBean idb = dip.getDocument(); idb.setStatusTags(determineStatusTags(idb)); }  @Override void filter(DocumentIndexingPackage dip);  }### Answer:
@Test public void testDescribedWork() throws Exception { contentStatus.add(FacetConstants.CONTENT_DESCRIBED); filter.filter(dip); verify(idb).setStatusTags(setCaptor.capture()); assertTrue(setCaptor.getValue().contains(FacetConstants.CONTENT_DESCRIBED)); assertFalse(setCaptor.getValue().contains(FacetConstants.CONTENT_NOT_DESCRIBED)); }
@Test public void testNotDescribedWork() throws Exception { filter.filter(dip); verify(idb).setStatusTags(setCaptor.capture()); assertTrue(setCaptor.getValue().contains(FacetConstants.CONTENT_NOT_DESCRIBED)); assertFalse(setCaptor.getValue().contains(FacetConstants.CONTENT_DESCRIBED)); }
@Test public void testPrimaryObject() throws Exception { contentStatus.add(FacetConstants.IS_PRIMARY_OBJECT); filter.filter(dip); verify(idb).setStatusTags(setCaptor.capture()); assertTrue(setCaptor.getValue().contains(FacetConstants.IS_PRIMARY_OBJECT)); }
@Test public void testEmbargoed() throws Exception { accessStatus.add(FacetConstants.EMBARGOED); filter.filter(dip); verify(idb).setStatusTags(setCaptor.capture()); assertTrue(setCaptor.getValue().contains(FacetConstants.EMBARGOED)); }
@Test public void testNoStatusTags() throws Exception { filter.filter(dip); verify(idb).setStatusTags(setCaptor.capture()); assertFalse(setCaptor.getValue().contains(FacetConstants.EMBARGOED)); assertFalse(setCaptor.getValue().contains(FacetConstants.IS_PRIMARY_OBJECT)); assertFalse(setCaptor.getValue().contains(FacetConstants.CONTENT_DESCRIBED)); assertTrue(setCaptor.getValue().contains(FacetConstants.CONTENT_NOT_DESCRIBED)); }