public function testFailedPreviewPendingCharges()
{
$this->client->addResponse('POST', '/accounts/abcdef1234567890/invoices/preview', 'invoices/create-422.xml');
try {
$invoice = Recurly_Invoice::previewPendingCharges('abcdef1234567890', array(), $this->client);
$this->fail("Expected Recurly_ValidationError");
} catch (Recurly_ValidationError $e) {
$this->assertEquals($e->errors[0]->symbol, 'will_not_invoice');
}
}