// Path: src/main/java/com/shippo/exception/APIConnectionException.java
// public class APIConnectionException extends ShippoException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public APIConnectionException(String message) {
// 		super(message);
// 	}
// 
// 	public APIConnectionException(String message, Throwable e) {
// 		super(message, e);
// 	}
// 
// }
// 
// Path: src/main/java/com/shippo/exception/APIException.java
// public class APIException extends ShippoException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public APIException(String message, Throwable e) {
//         super(message, e);
//     }
// 
// }
// 
// Path: src/main/java/com/shippo/exception/AuthenticationException.java
// public class AuthenticationException extends ShippoException {
// 
//     public AuthenticationException(String message) {
//         super(message);
//     }
// 
//     private static final long serialVersionUID = 1L;
// 
// }
// 
// Path: src/main/java/com/shippo/exception/InvalidRequestException.java
// public class InvalidRequestException extends ShippoException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     private final String param;
// 
//     public InvalidRequestException(String message, String param, Throwable e) {
//         super(message, e);
//         this.param = param;
//     }
// 
//     public String getParam() {
//         return param;
//     }
// 
// }
// 
// Path: src/main/java/com/shippo/exception/ShippoException.java
// public abstract class ShippoException extends Exception {
// 
//     public ShippoException(String message) {
//         super(message, null);
//     }
// 
//     public ShippoException(String message, Throwable e) {
//         super(message, e);
//     }
// 
//     private static final long serialVersionUID = 1L;
// 
// }


import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import com.shippo.exception.APIConnectionException;
import com.shippo.exception.APIException;
import com.shippo.exception.AuthenticationException;
import com.shippo.exception.InvalidRequestException;
import com.shippo.exception.ShippoException;
    @Test
    public void testListAll() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {
        AddressCollection objectCollection = Address.all(null);
        assertNotNull(objectCollection.getData());
    }

    @Test
    public void testListPageSize() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {
        Map<String, Object> objectMap = new HashMap<String, Object>();
        objectMap.put("results", "1"); // one result per page
        objectMap.put("page", "1"); // the first page of results
        AddressCollection addressCollection = Address.all(objectMap);
        assertEquals(addressCollection.getData().size(), 1);
    }

    @Test
    public void testInvalidAddress() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {
        Address testAddress = (Address) getInvalidAddress();
        assertFalse(testAddress.getValidationResults().getIsValid());
        assertTrue(testAddress.getValidationResults().getValidationMessages().size() > 0);
        assertNotNull(testAddress.getValidationResults().getValidationMessages().get(0).getSource());
        assertNotNull(testAddress.getValidationResults().getValidationMessages().get(0).getCode());
        assertNotNull(testAddress.getValidationResults().getValidationMessages().get(0).getText());
    }

    @Test
    public void testValidAddress() throws AuthenticationException, InvalidRequestException, APIConnectionException,
// Path: src/main/java/com/shippo/exception/APIConnectionException.java
// public class APIConnectionException extends ShippoException {
// 
// 	private static final long serialVersionUID = 1L;
// 
// 	public APIConnectionException(String message) {
// 		super(message);
// 	}
// 
// 	public APIConnectionException(String message, Throwable e) {
// 		super(message, e);
// 	}
// 
// }
// 
// Path: src/main/java/com/shippo/exception/APIException.java
// public class APIException extends ShippoException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     public APIException(String message, Throwable e) {
//         super(message, e);
//     }
// 
// }
// 
// Path: src/main/java/com/shippo/exception/AuthenticationException.java
// public class AuthenticationException extends ShippoException {
// 
//     public AuthenticationException(String message) {
//         super(message);
//     }
// 
//     private static final long serialVersionUID = 1L;
// 
// }
// 
// Path: src/main/java/com/shippo/exception/InvalidRequestException.java
// public class InvalidRequestException extends ShippoException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     private final String param;
// 
//     public InvalidRequestException(String message, String param, Throwable e) {
//         super(message, e);
//         this.param = param;
//     }
// 
//     public String getParam() {
//         return param;
//     }
// 
// }
// 
// Path: src/main/java/com/shippo/exception/ShippoException.java
// public abstract class ShippoException extends Exception {
// 
//     public ShippoException(String message) {
//         super(message, null);
//     }
// 
//     public ShippoException(String message, Throwable e) {
//         super(message, e);
//     }
// 
//     private static final long serialVersionUID = 1L;
// 
// }


// Path: src/test/java/com/shippo/model/AddressTest.java
import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import com.shippo.exception.APIConnectionException;
import com.shippo.exception.APIException;
import com.shippo.exception.AuthenticationException;
import com.shippo.exception.InvalidRequestException;
import com.shippo.exception.ShippoException;

    @Test
    public void testListAll() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {
        AddressCollection objectCollection = Address.all(null);
        assertNotNull(objectCollection.getData());
    }

    @Test
    public void testListPageSize() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {
        Map<String, Object> objectMap = new HashMap<String, Object>();
        objectMap.put("results", "1"); // one result per page
        objectMap.put("page", "1"); // the first page of results
        AddressCollection addressCollection = Address.all(objectMap);
        assertEquals(addressCollection.getData().size(), 1);
    }

    @Test
    public void testInvalidAddress() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {
        Address testAddress = (Address) getInvalidAddress();
        assertFalse(testAddress.getValidationResults().getIsValid());
        assertTrue(testAddress.getValidationResults().getValidationMessages().size() > 0);
        assertNotNull(testAddress.getValidationResults().getValidationMessages().get(0).getSource());
        assertNotNull(testAddress.getValidationResults().getValidationMessages().get(0).getCode());
        assertNotNull(testAddress.getValidationResults().getValidationMessages().get(0).getText());
    }

    @Test
    public void testValidAddress() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {