Exception when Form::getHttpData() returns NULL

I'm writting tests and I need to fake-submit the form, so I write something like

    $form = new Nette\Application\UI\Form();
    $send = $form->addSubmit('send');
    $form->setSubmittedBy($send);

This results in error

    Recoverable Error
    Argument 1 passed to Nette\Utils\Arrays::get() must be an array, null given, called in .../Nette/Forms/Controls/BaseControl.php on line 344 and defined