// 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.List;
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;
package com.shippo.model;





public class TransactionTest extends ShippoTest {

	/**
	 * Intentionally commented out as this test could result in a purchase of a
	 * non test label depending on your carrier account settings
	 *
	 * To use this test, please make sure that test mode is enabled for the
	 * default rate object used
	 *
	 * @Test
	 *       public void testValidCreate() {
	 *       Transaction testObject = (Transaction) getDefaultObject();
	 *       assertEquals("SUCCESS", testObject.getStatus());
	 * 
	 **/

	@Test(expected = InvalidRequestException.class)
	public void testInvalidCreate() throws AuthenticationException,
			InvalidRequestException, APIConnectionException, APIException {
		Transaction.create(getInvalidObjectMap());
	}

	@Test
	public void testRetrieve() throws AuthenticationException,
			InvalidRequestException, APIConnectionException, APIException {
		Transaction testObject = (Transaction) getDefaultObject();
		Transaction retrievedObject;

		retrievedObject = Transaction.retrieve((String) testObject.objectId);
		assertEquals(testObject.objectId, retrievedObject.objectId);

	}

	@Test(expected = InvalidRequestException.class)
	public void testInvalidRetrieve() throws AuthenticationException,
			InvalidRequestException, APIConnectionException, APIException {
		Transaction.retrieve("invalid_id");
	}

	@Test
	public void testListAll() throws AuthenticationException,
// 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/TransactionTest.java
import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.List;
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;

package com.shippo.model;





public class TransactionTest extends ShippoTest {

	/**
	 * Intentionally commented out as this test could result in a purchase of a
	 * non test label depending on your carrier account settings
	 *
	 * To use this test, please make sure that test mode is enabled for the
	 * default rate object used
	 *
	 * @Test
	 *       public void testValidCreate() {
	 *       Transaction testObject = (Transaction) getDefaultObject();
	 *       assertEquals("SUCCESS", testObject.getStatus());
	 * 
	 **/

	@Test(expected = InvalidRequestException.class)
	public void testInvalidCreate() throws AuthenticationException,
			InvalidRequestException, APIConnectionException, APIException {
		Transaction.create(getInvalidObjectMap());
	}

	@Test
	public void testRetrieve() throws AuthenticationException,
			InvalidRequestException, APIConnectionException, APIException {
		Transaction testObject = (Transaction) getDefaultObject();
		Transaction retrievedObject;

		retrievedObject = Transaction.retrieve((String) testObject.objectId);
		assertEquals(testObject.objectId, retrievedObject.objectId);

	}

	@Test(expected = InvalidRequestException.class)
	public void testInvalidRetrieve() throws AuthenticationException,
			InvalidRequestException, APIConnectionException, APIException {
		Transaction.retrieve("invalid_id");
	}

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