// Path: Drop-In/src/sharedTest/java/com/braintreepayments/api/Assertions.java
// public static void assertIsANonce(String maybeANonce) {
//     assertNotNull("Nonce was null", maybeANonce);
//     assertTrue("Does not match the expected form of a nonce. Expected \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\" got \"" + maybeANonce + "\"",
//             maybeANonce.matches("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"));
// }
// 
// Path: Drop-In/src/sharedTest/java/com/braintreepayments/api/CardNumber.java
// public static final String VISA = "4111111111111111";
// 
// Path: Drop-In/src/sharedTest/java/com/braintreepayments/api/ExpirationDate.java
// public static String validExpirationYear() {
//     return String.valueOf(Calendar.getInstance().get(Calendar.YEAR) + 1).substring(2);
// }


import static com.braintreepayments.api.Assertions.assertIsANonce;
import static com.braintreepayments.api.CardNumber.VISA;
import static com.braintreepayments.api.ExpirationDate.validExpirationYear;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
import android.content.Context;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.concurrent.CountDownLatch;
package com.braintreepayments.api;






@RunWith(AndroidJUnit4ClassRunner.class)
public class PaymentMethodClientTest {

    private Context context;

    @Before
    public void setUp() {
        context = ApplicationProvider.getApplicationContext();
    }

    @Test(timeout = 10000)
    public void getPaymentMethodNonces_andDeletePaymentMethod_returnsCardNonce() throws InterruptedException {
        final CountDownLatch latch = new CountDownLatch(1);
        final String clientToken = new TestClientTokenBuilder().withCustomerId().build();

        final BraintreeClient braintreeClient = new BraintreeClient(context, clientToken);
        CardClient cardClient = new CardClient(braintreeClient);
        final PaymentMethodClient sut = new PaymentMethodClient(braintreeClient);

        Card card = new Card();
// Path: Drop-In/src/sharedTest/java/com/braintreepayments/api/Assertions.java
// public static void assertIsANonce(String maybeANonce) {
//     assertNotNull("Nonce was null", maybeANonce);
//     assertTrue("Does not match the expected form of a nonce. Expected \"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$\" got \"" + maybeANonce + "\"",
//             maybeANonce.matches("^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"));
// }
// 
// Path: Drop-In/src/sharedTest/java/com/braintreepayments/api/CardNumber.java
// public static final String VISA = "4111111111111111";
// 
// Path: Drop-In/src/sharedTest/java/com/braintreepayments/api/ExpirationDate.java
// public static String validExpirationYear() {
//     return String.valueOf(Calendar.getInstance().get(Calendar.YEAR) + 1).substring(2);
// }


// Path: Drop-In/src/androidTest/java/com/braintreepayments/api/PaymentMethodClientTest.java
import static com.braintreepayments.api.Assertions.assertIsANonce;
import static com.braintreepayments.api.CardNumber.VISA;
import static com.braintreepayments.api.ExpirationDate.validExpirationYear;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.fail;
import android.content.Context;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.concurrent.CountDownLatch;

package com.braintreepayments.api;






@RunWith(AndroidJUnit4ClassRunner.class)
public class PaymentMethodClientTest {

    private Context context;

    @Before
    public void setUp() {
        context = ApplicationProvider.getApplicationContext();
    }

    @Test(timeout = 10000)
    public void getPaymentMethodNonces_andDeletePaymentMethod_returnsCardNonce() throws InterruptedException {
        final CountDownLatch latch = new CountDownLatch(1);
        final String clientToken = new TestClientTokenBuilder().withCustomerId().build();

        final BraintreeClient braintreeClient = new BraintreeClient(context, clientToken);
        CardClient cardClient = new CardClient(braintreeClient);
        final PaymentMethodClient sut = new PaymentMethodClient(braintreeClient);

        Card card = new Card();
        card.setNumber(VISA);