private void assertFinderForBean(String expectedBeanName, Restlet restlet) {
assertTrue("Restlet is not a bean finder restlet: "
+ restlet.getClass().getName(),
restlet instanceof SpringBeanFinder);
final SpringBeanFinder actualFinder = (SpringBeanFinder) restlet;
assertEquals("Finder does not point to correct bean", expectedBeanName,
actualFinder.getBeanName());
assertEquals("Finder does not point to correct bean factory",
this.factory, actualFinder.getBeanFactory());
}