/**
  * @test
  */
 public function thatCreate()
 {
     $branch = new Branch('DUMM', 'DUMMY_NAME', 'DUMMY_DESC');
     $branchEmailConfiguration = new BranchEmailConfiguration($branch, self::DUMMY_CUSTOMER_DOMAINS, self::DUMMY_SUPPORT_ADDRESS);
     $this->assertEquals($branch, $branchEmailConfiguration->getBranch());
     $this->assertEquals(self::DUMMY_CUSTOMER_DOMAINS, $branchEmailConfiguration->getCustomerDomains());
     $this->assertEquals(self::DUMMY_SUPPORT_ADDRESS, $branchEmailConfiguration->getSupportAddress());
 }
 public static function fromBranchEmailConfiguration(BranchEmailConfiguration $branchEmailConfiguration)
 {
     $command = new self();
     $command->id = $branchEmailConfiguration->getId();
     $command->branch = $branchEmailConfiguration->getBranch();
     $command->customerDomains = $branchEmailConfiguration->getCustomerDomains();
     $command->supportAddress = $branchEmailConfiguration->getSupportAddress();
     return $command;
 }