public function canGetGridWhenItDoesNotExistButStorageDoes()
{
$form = Form::create();
$instance = $this->createMockedInstanceForVariableContainerTests();
$this->templateVariableContainer->expects($this->any())->method('exists')->willReturn(FALSE);
$this->viewHelperVariableContainer->expects($this->at(0))->method('exists')->with(AbstractFormViewHelper::SCOPE, AbstractFormViewHelper::SCOPE_VARIABLE_FORM)->will($this->returnValue(TRUE));
$this->viewHelperVariableContainer->expects($this->at(1))->method('get')->with(AbstractFormViewHelper::SCOPE, AbstractFormViewHelper::SCOPE_VARIABLE_FORM)->will($this->returnValue($form));
$this->viewHelperVariableContainer->expects($this->at(2))->method('exists')->with(AbstractFormViewHelper::SCOPE, AbstractFormViewHelper::SCOPE_VARIABLE_GRIDS)->will($this->returnValue(TRUE));
$this->viewHelperVariableContainer->expects($this->at(3))->method('get')->with(AbstractFormViewHelper::SCOPE, AbstractFormViewHelper::SCOPE_VARIABLE_GRIDS)->will($this->returnValue(array()));
$output = $this->callInaccessibleMethod($instance, 'getGrid', 'test');
$this->assertInstanceOf('FluidTYPO3\\Flux\\Form\\Container\\Grid', $output);
}