function testParsingInvalidSignatureRaisesError()
 {
     $sampleNotification = Braintree_WebhookTesting::sampleNotification(Braintree_WebhookNotification::SUBSCRIPTION_WENT_PAST_DUE, 'my_id');
     $this->setExpectedException('Braintree_Exception_InvalidSignature');
     $webhookNotification = Braintree_WebhookNotification::parse("bad_signature", $sampleNotification['payload']);
 }
 function testBuildsASampleNotificationForAPartnerMerchantDeclinedWebhook()
 {
     $sampleNotification = Braintree_WebhookTesting::sampleNotification(Braintree_WebhookNotification::PARTNER_MERCHANT_DECLINED, "my_id");
     $webhookNotification = Braintree_WebhookNotification::parse($sampleNotification['bt_signature'], $sampleNotification['bt_payload']);
     $this->assertEquals(Braintree_WebhookNotification::PARTNER_MERCHANT_DECLINED, $webhookNotification->kind);
     $this->assertEquals("abc123", $webhookNotification->partnerMerchant->partnerMerchantId);
 }