IndexableStub stub = new IndexableStub();
stub.setReturnNull(true);
try{
this.strategy.processIndexable(stub);
fail("retun value is null must fail");
}catch (NotIndexableException e) {}
assertNull(this.strategy.content);
String content = "fooBar";
//just to make sure the filter is applied.
String htmlContent = "<b>"+content+"</b>";
stub.setReturnNull(false);
stub.setReturnValueTextContent(htmlContent);
this.strategy.processIndexable(stub);
assertNotNull(this.strategy.content);
assertEquals(content,this.strategy.content);
// test for xpath exc.
this.field.setPath(null);
try{
this.strategy.processIndexable(stub);
fail("path is null must fail");
}catch (NotIndexableException e) {}