// 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.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
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;
            APIException {
        Shipment.retrieve("invalid_id");
    }

    @Test
    public void testListAll() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {
        ShipmentCollection objectCollection = Shipment.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
        ShipmentCollection ShipmentCollection = Shipment.all(objectMap);
        assertEquals(ShipmentCollection.getData().size(), 1);
    }

    public static Object getDefaultObject() {
        // Create prerequisite helper objects
        Address addressFrom = (Address) AddressTest.getDefaultObject();
        Address addressTo = (Address) AddressTest.getSecondObject();
        Parcel parcel = (Parcel) ParcelTest.getDefaultObject();

        TimeZone tz = TimeZone.getTimeZone("PST");
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
        df.setTimeZone(tz);
// 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/ShipmentTest.java
import static org.junit.Assert.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
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;

            APIException {
        Shipment.retrieve("invalid_id");
    }

    @Test
    public void testListAll() throws AuthenticationException, InvalidRequestException, APIConnectionException,
            APIException {
        ShipmentCollection objectCollection = Shipment.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
        ShipmentCollection ShipmentCollection = Shipment.all(objectMap);
        assertEquals(ShipmentCollection.getData().size(), 1);
    }

    public static Object getDefaultObject() {
        // Create prerequisite helper objects
        Address addressFrom = (Address) AddressTest.getDefaultObject();
        Address addressTo = (Address) AddressTest.getSecondObject();
        Parcel parcel = (Parcel) ParcelTest.getDefaultObject();

        TimeZone tz = TimeZone.getTimeZone("PST");
        DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
        df.setTimeZone(tz);
        List<Parcel> parcels = new ArrayList<Parcel>();