/**
* @testdox Merging a bag that has a constructor method with a new one that has one as well, the result will kept its constructor method.
*/
public function testMergeTwoBags2()
{
$constructorA = new SimpleMethodCall('childCreate', []);
$constructorB = new SimpleMethodCall('parentCreate', []);
$bagA = new SpecificationBag($constructorA, new PropertyBag(), new MethodCallBag());
$bagB = new SpecificationBag($constructorB, new PropertyBag(), new MethodCallBag());
$bag = $bagA->mergeWith($bagB);
$this->assertEquals($constructorA, $bagA->getConstructor());
$this->assertEquals($constructorB, $bagB->getConstructor());
$this->assertEquals($constructorA, $bag->getConstructor());
}