function it_adds_configuration_field_on_pre_set_data($calculatorRegistry, $factory, $formRegistry, FormEvent $event, FormInterface $form, ShippingMethod $shippingMethod, FormInterface $formConfiguration, CalculatorInterface $calculator)
{
$event->getData()->shouldBeCalled()->willReturn($shippingMethod);
$event->getForm()->shouldBeCalled()->willReturn($form);
$shippingMethod->getId()->shouldBeCalled()->willreturn(12);
$shippingMethod->getCalculator()->shouldBeCalled()->willreturn('calculator_type');
$shippingMethod->getConfiguration()->shouldBeCalled()->willreturn([]);
$calculatorRegistry->get('calculator_type')->shouldBeCalled()->willReturn($calculator);
$calculator->getType()->shouldBeCalled()->willReturn('calculator_type');
$formRegistry->has('calculator_type', 'default')->shouldBeCalled()->willReturn(true);
$formRegistry->get('calculator_type', 'default')->shouldBeCalled()->willReturn('sylius_shipping_calculator_calculator_type');
$factory->createNamed('configuration', 'sylius_shipping_calculator_calculator_type', [], ['auto_initialize' => false])->shouldBeCalled()->willReturn($formConfiguration);
$form->add($formConfiguration)->shouldBeCalled();
$this->preSetData($event);
}