}
@Test
public void found_edit_block()
{
Block block = mockBlock();
RequestPageCache cache = mockRequestPageCache();
Page page = mockPage();
BeanBlockContribution contribution = new BeanBlockContribution("mydata", "MyPage",
"mydisplay", true);
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.
Block actual = source.getEditBlock("MyData");
assertSame(actual, block);
verify();
}