/**
  * Tests if the merge method works successfully.
  *
  * @return void
  */
 public function testMergeSuccessful()
 {
     // initialize the configuration
     $node = new SessionNode();
     $node->initFromFile(__DIR__ . '/_files/dd-sessionbean.xml');
     // initialize the descriptor from the nodes data
     $this->descriptor->fromConfiguration($node);
     // initialize the descriptor to merge
     $descriptorToMerge = $this->getMockForAbstractClass('AppserverIo\\Description\\BeanDescriptor');
     // initialize the configuration of the descriptor to be merged
     $nodeToMerge = new SessionNode();
     $nodeToMerge->initFromFile(__DIR__ . '/_files/dd-sessionbean-to-merge.xml');
     $descriptorToMerge->fromConfiguration($nodeToMerge);
     // merge the descriptors
     $this->descriptor->merge($descriptorToMerge);
     // check if all values have been merged
     $this->assertSame('SampleProcessor', $this->descriptor->getName());
     $this->assertSame('AppserverIo\\Apps\\Example\\Services\\SampleProcessor', $this->descriptor->getClassName());
     $this->assertCount(2, $this->descriptor->getEpbReferences());
     $this->assertCount(3, $this->descriptor->getResReferences());
     $this->assertCount(2, $this->descriptor->getPersistenceUnitReferences());
     $this->assertCount(7, $this->descriptor->getReferences());
 }