package com.lob.model;

import com.lob.BaseTest;
import com.lob.exception.APIException;
import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

public class IntlVerificationTest extends BaseTest {

    @Test
    public void testInternationalVerification() throws Exception {
        try {
            new IntlVerification.RequestBuilder()
                    .setPrimaryLine("370 Water St")
                    .setCity("Summerside")
                    .setState("Prince Edward Island")
                    .setPostalCode("C1N 1C4")
                    .setCountry("CA")
                    .verify();
        } catch (final APIException e) {
            assertThat(e.getStatusCode(), is(403));
        }
    }

}

package com.lob.model;

import com.lob.BaseTest;
import com.lob.net.LobResponse;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class IntlVerificationTest extends BaseTest {

    @Test
    public void testInternationalVerification() throws Exception {
        LobResponse<IntlVerification> response = new IntlVerification.RequestBuilder()
                    .setPrimaryLine("370 Water St")
                    .setCity("Summerside")
                    .setState("Prince Edward Island")
                    .setPostalCode("C1N 1C4")
                    .setCountry("CA")
                    .verify();

        IntlVerification intlVerification = response.getResponseBody();

        assertEquals(200, response.getResponseCode());
        assertEquals("TEST KEYS DO NOT VERIFY ADDRESSES", intlVerification.getRecipient());
    }

}

update intl ver test (#155)