public function testCorrectSignatureMethodCanBeExtractedFromResponse()
{
$response = new \DOMDocument();
$response->load(__DIR__ . '/Response/response.xml');
$privateKey = CertificatesMock::getPrivateKey();
$unsignedMessage = Message::fromXML($response->documentElement);
$unsignedMessage->setSignatureKey($privateKey);
$unsignedMessage->setCertificates(array(CertificatesMock::PUBLIC_KEY_PEM));
$signedMessage = Message::fromXML($unsignedMessage->toSignedXML());
$this->assertEquals($privateKey->getAlgorith(), $signedMessage->getSignatureMethod());
}