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));
        }
    }

}

@@ -64,30 +64,23 @@
 lob.
-exception.APIException
+net.LobResponse
 ;%0D%0Ai
@@ -108,48 +108,8 @@
 %0D%0A%0D%0A
-import static org.hamcrest.core.Is.is;%0D%0A
 impo
@@ -141,20 +141,22 @@
 t.assert
-That
+Equals
 ;%0D%0A%0D%0Apub
@@ -299,26 +299,48 @@
     
-try %7B%0D%0A           
+LobResponse%3CIntlVerification%3E response =
  new
@@ -645,24 +645,26 @@
 ify();%0D%0A
+%0D%0A
         
 %7D catch 
@@ -659,104 +659,222 @@
     
-%7D catch (final APIException e) %7B%0D%0A            assertThat(e.getStatusCode(), is(403));%0D%0A        %7D
+IntlVerification intlVerification = response.getResponseBody();%0D%0A%0D%0A        assertEquals(200, response.getResponseCode());%0D%0A        assertEquals(%22TEST KEYS DO NOT VERIFY ADDRESSES%22, intlVerification.getRecipient());
 %0D%0A  

update intl ver test (#155)