	@Test
	public void testFilter() throws IndexingException {

		
		// Prepare data
		Parse parse = mock(Parse.class);
		Configuration configuration = mock(Configuration.class);
		ParseData parseData = new ParseData();
		parseData.setParseMeta(metadata);

		// Mock data
		when(parse.getData()).thenReturn(parseData);
		when(configuration.get(anyString())).thenReturn("");
		when(configuration.getConfResourceAsReader(anyString())).thenReturn(new InputStreamReader(OmitIndexingFilterTest.class.getResourceAsStream("example-omit-indexfilter-conf.xml")));
		
		omitIndexingFilter.setConf(configuration);
		NutchDocument nutchDocumentOut = omitIndexingFilter.filter(nutchDocumentIn, parse, new Text("http://www.test.ba/"), null, null);
		
		assertNull("Document unsuccessfuly filtered!", nutchDocumentOut);
		
		nutchDocumentOut = omitIndexingFilter.filter(nutchDocumentIn, parse, new Text("http://www.test.com/"), null, null);
		assertSame("Document unsuccessfuly filtered!", nutchDocumentIn, nutchDocumentOut);
		
	}