private static final Collection<BeanBlockContribution> EMPTY_CONFIGURATION = Collections.emptyList();
@Test
public void found_display_block()
{
Block block = mockBlock();
RequestPageCache cache = mockRequestPageCache();
Page page = mockPage();
BeanBlockContribution contribution = new BeanBlockContribution("mydata", "MyPage",
"mydisplay", false);
Collection<BeanBlockContribution> configuration = newList(contribution);
train_get(cache, "MyPage", page);
train_getBlock(page, "mydisplay", block);
replay();
BeanBlockSource source = new BeanBlockSourceImpl(cache, createBeanBlockOverrideSource(cache), configuration);
// Check case insensitivity while we are at it.
assertTrue(source.hasDisplayBlock("MyData"));
Block actual = source.getDisplayBlock("MyData");
assertSame(actual, block);
verify();
}