public function testGet()
{
$addressFormatRepository = new AddressFormatRepository();
$addressFormat = $addressFormatRepository->get('ES');
// Confirm that the right class has been returned, a known value has
// been successfully populated, and defaults have been merged.
$this->assertInstanceOf('CommerceGuys\\Addressing\\AddressFormat\\AddressFormat', $addressFormat);
$this->assertEquals('ES', $addressFormat->getCountryCode());
$this->assertEquals(AdministrativeAreaType::PROVINCE, $addressFormat->getAdministrativeAreaType());
$this->assertEquals(LocalityType::CITY, $addressFormat->getLocalityType());
$this->assertEquals(PostalCodeType::POSTAL, $addressFormat->getPostalCodeType());
$this->assertEquals('\\d{5}', $addressFormat->getPostalCodePattern());
}