public function testCreateUsageFromSubscription()
{
$this->client->addResponse('GET', '/subscriptions/012345678901234567890123456789ab', 'subscriptions/show-200.xml');
$this->client->addResponse('POST', '/subscriptions/012345678901234567890123456789ab/add_ons/marketing_emails/usage', 'usage/create-201.xml');
$subscription = Recurly_Subscription::get('012345678901234567890123456789ab', $this->client);
$usage = $subscription->buildUsage('marketing_emails', $this->client);
$usage->create();
$this->assertInstanceOf('Recurly_Usage', $usage);
$this->assertInstanceOf('Recurly_Stub', $usage->measured_unit);
}