public class SpringBasedProductionTraversalContextTest extends TestCase {
public final void testSpringBased() {
ApplicationContext applicationContext;
applicationContext = new FileSystemXmlApplicationContext(
"testdata/traversalContextData/applicationContext.xml");
TraversalContext traversalContext = (TraversalContext) applicationContext
.getBean("TraversalContext");
assertNotNull(traversalContext);
assertEquals(2500000, traversalContext.maxDocumentSize());
assertTrue(traversalContext.mimeTypeSupportLevel("text/plain") <= 0);
assertTrue(traversalContext.mimeTypeSupportLevel("text/notplain")
<= 0);
assertEquals(1, traversalContext.mimeTypeSupportLevel("ibblefrix"));
assertEquals("ibblefrix", traversalContext.preferredMimeType(
Collections.singleton("ibblefrix")));
}