assertFieldSelectorDisabled();
}
else {
assertNotNull( FieldSelectorLeakingReaderProvider.fieldSelector );
assertTrue( fieldSelector instanceof ReusableDocumentStoredFieldVisitor );
ReusableDocumentStoredFieldVisitor visitor = (ReusableDocumentStoredFieldVisitor) fieldSelector;
assertEquals( expectedFieldNames.length, visitor.countAcceptedFields() );
for ( String fieldName : expectedFieldNames ) {
FieldInfo fieldId = forgeFieldInfo( fieldName );
assertEquals( Status.YES, visitor.needsField( fieldId ) );
}
}
}