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





// Test is affected by inability of API to make test purchases
public class RefundTest extends ShippoTest {

    // Not testable with the current API
    // @Test
    // public void testValidCreate() {
    // Refund testObject = (Refund) getDefaultObject();
    // assertEquals("QUEUED", testObject.getObject_status());
    // }

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

    // Not testable with the current API
    // @Test
    // public void testRetrieve() throws AuthenticationException,
    // InvalidRequestException, APIConnectionException,
    // APIException {
    // Refund testObject = (Refund) getDefaultObject();
    // Refund retrievedObject;
    //
    // retrievedObject = Refund.retrieve((String) testObject.object_id);
    // assertEquals(testObject.object_id, retrievedObject.object_id);
    //
    // }

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

    @Test
// 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/RefundTest.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;

package com.shippo.model;





// Test is affected by inability of API to make test purchases
public class RefundTest extends ShippoTest {

    // Not testable with the current API
    // @Test
    // public void testValidCreate() {
    // Refund testObject = (Refund) getDefaultObject();
    // assertEquals("QUEUED", testObject.getObject_status());
    // }

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

    // Not testable with the current API
    // @Test
    // public void testRetrieve() throws AuthenticationException,
    // InvalidRequestException, APIConnectionException,
    // APIException {
    // Refund testObject = (Refund) getDefaultObject();
    // Refund retrievedObject;
    //
    // retrievedObject = Refund.retrieve((String) testObject.object_id);
    // assertEquals(testObject.object_id, retrievedObject.object_id);
    //
    // }

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

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