@@ -0,0 +1,2499 @@
+package com.braintreegateway.unittest;%0A%0Aimport com.braintreegateway.PaymentMethodNonce;%0Aimport com.braintreegateway.util.NodeWrapper;%0Aimport com.braintreegateway.util.NodeWrapperFactory;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assert.assertNull;%0A%0Apublic class PaymentMethodNonceTest %7B%0A%0A    @Test%0A    public void parsesNodeCorrectlyWithDetailsMissing() %7B%0A        String xml = %22%3C?xml version=%5C%221.0%5C%22 encoding=%5C%22UTF-8%5C%22?%3E%22 +%0A                %22%3Cpayment-method-nonce%3E%22 +%0A                %22  %3Ctype%3ECreditCard%3C/type%3E%22 +%0A                %22  %3Cnonce%3Efake-valid-nonce%3C/nonce%3E%22 +%0A                %22  %3Cdescription%3Eending in 22%3C/description%3E%22 +%0A                %22  %3Cconsumed type=%5C%22boolean%5C%22%3Efalse%3C/consumed%3E%22 +%0A                %22  %3Cthree-d-secure-info nil=%5C%22true%5C%22/%3E%22 +%0A                %22%3C/payment-method-nonce%3E%22;%0A%0A        NodeWrapper nodeWrapper = NodeWrapperFactory.instance.create(xml);%0A        PaymentMethodNonce paymentMethodNonce = new PaymentMethodNonce(nodeWrapper);%0A%0A        assertNotNull(paymentMethodNonce);%0A        assertEquals(%22CreditCard%22, paymentMethodNonce.getType());%0A        assertEquals(%22fake-valid-nonce%22, paymentMethodNonce.getNonce());%0A        assertEquals(false, paymentMethodNonce.isConsumed());%0A        assertNull(paymentMethodNonce.getThreeDSecureInfo());%0A        assertNull(paymentMethodNonce.getDetails());%0A    %7D%0A%0A    @Test%0A    public void ParsesNodeCorrectlyWithNilValues() %7B%0A        String xml = %22%3C?xml version=%5C%221.0%5C%22 encoding=%5C%22UTF-8%5C%22?%3E%22 +%0A                %22%3Cpayment-method-nonce%3E%22 +%0A                %22  %3Ctype%3ECreditCard%3C/type%3E%22 +%0A                %22  %3Cnonce%3Efake-valid-nonce%3C/nonce%3E%22 +%0A                %22  %3Cdescription%3Eending in 22%3C/description%3E%22 +%0A                %22  %3Cconsumed type=%5C%22boolean%5C%22%3Efalse%3C/consumed%3E%22 +%0A                %22  %3Cthree-d-secure-info nil=%5C%22true%5C%22/%3E%22 +%0A                %22  %3Cdetails nil=%5C%22true%5C%22/%3E%22 +%0A                %22%3C/payment-method-nonce%3E%22;%0A%0A        NodeWrapper nodeWrapper = NodeWrapperFactory.instance.create(xml);%0A        PaymentMethodNonce paymentMethodNonce = new PaymentMethodNonce(nodeWrapper);%0A%0A        assertNotNull(paymentMethodNonce);%0A        assertEquals(%22CreditCard%22, paymentMethodNonce.getType());%0A        assertEquals(%22fake-valid-nonce%22, paymentMethodNonce.getNonce());%0A        assertEquals(false, paymentMethodNonce.isConsumed());%0A        assertNull(paymentMethodNonce.getThreeDSecureInfo());%0A        assertNull(paymentMethodNonce.getDetails());%0A    %7D%0A%7D%0A

Add unit tests