function test_paypalAccountEmail()
 {
     $nonce = Braintree_HttpClientApi::nonceForPayPalAccount(array('paypal_account' => array('consent_code' => 'PAYPAL_CONSENT_CODE')));
     $customerId = 'UNIQUE_CUSTOMER_ID-' . strval(rand());
     $customerResult = Braintree_Customer::create(array('paymentMethodNonce' => $nonce, 'id' => $customerId));
     $this->assertTrue($customerResult->success);
     $customer = $customerResult->customer;
     $collection = Braintree_Customer::search(array(Braintree_CustomerSearch::id()->is($customer->id), Braintree_CustomerSearch::paypalAccountEmail()->is('*****@*****.**')));
     $this->assertEquals(1, $collection->maximumCount());
     $this->assertEquals($customer->id, $collection->firstItem()->id);
 }