// Path: src/main/java/com/hyperwallet/clientsdk/HyperwalletException.java
// public class HyperwalletException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     private Response response = null;
//     private String errorMessage;
//     private String errorCode;
//     private List<String> relatedResources;
//     private HyperwalletErrorList hyperwalletErrorList;
// 
//     public HyperwalletException(final Exception e) {
//         super(e);
//     }
// 
//     public HyperwalletException(final Response response, final int code, final String message) {
//         super(message);
// 
//         this.response = response;
//         errorCode = Integer.toString(code);
//         errorMessage = message;
//     }
// 
//     public HyperwalletException(final Response response, final int code, final String message, final Exception e) {
//         super(e);
// 
//         this.response = response;
//         errorCode = Integer.toString(code);
//         errorMessage = message;
//     }
// 
//     public HyperwalletException(final Response response, final HyperwalletErrorList hyperwalletErrorList) {
//         super(hyperwalletErrorList.getErrors().get(0).getMessage());
// 
//         this.response = response;
//         this.hyperwalletErrorList = hyperwalletErrorList;
//         HyperwalletError error = this.hyperwalletErrorList.getErrors().get(0);
//         errorCode = error.getCode();
//         errorMessage = error.getMessage();
//         relatedResources = error.getRelatedResources();
//     }
// 
//     public HyperwalletException(final String errorMessage) {
//         super(errorMessage);
// 
//         this.errorMessage = errorMessage;
//     }
// 
//     public Response getResponse() {
//         return response;
//     }
// 
//     public String getErrorMessage() {
//         return errorMessage;
//     }
// 
//     public String getErrorCode() {
//         return errorCode;
//     }
// 
//     public List<String> getRelatedResources() {
//         return relatedResources;
//     }
// 
//     public List<HyperwalletError> getHyperwalletErrors() {
//         return hyperwalletErrorList != null ? hyperwalletErrorList.getErrors() : null;
//     }
// }
// 
// Path: src/main/java/com/hyperwallet/clientsdk/model/HyperwalletBaseMonitor.java
// public class HyperwalletBaseMonitor {
// 
//     @JsonIgnore
//     private Set<String> inclusions = new HashSet<String>();
// 
//     protected HyperwalletBaseMonitor() {
//     }
// 
//     public Set<String> getInclusions() {
//         return inclusions;
//     }
// 
//     protected void addField(String field, Object o) {
//         if (o == null && inclusions.contains(field)) {
//             inclusions.remove(field);
//         } else if (o != null) {
//             inclusions.add(field);
//         }
//     }
// 
//     protected void clearField(String field) {
//         inclusions.add(field);
//     }
// }


import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.core.type.TypeReference;
import com.hyperwallet.clientsdk.HyperwalletException;
import com.hyperwallet.clientsdk.model.HyperwalletBaseMonitor;
import org.testng.annotations.Test;
import javax.xml.bind.Element;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
        public void clearTest3() {
            clearField("test3");
            this.test3 = null;
        }
    }

    @JsonFilter(HyperwalletJsonConfiguration.INCLUSION_FILTER)
    @XmlRootElement
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class TestWithError extends HyperwalletBaseMonitor {
        public Element element;

        public TestWithError() {
            element = new Element() {
            };
            addField("element", element);
        }
    }

    @Test(expectedExceptions = UnsupportedOperationException.class)
    public void testInstanceCreation() {
        new HyperwalletJsonUtil();
    }

    @Test
    public void testFromJson_byClassReference_nullContent() {
        TestBody body = HyperwalletJsonUtil.fromJson(null, TestBody.class);
        assertThat(body, is(nullValue()));
    }

// Path: src/main/java/com/hyperwallet/clientsdk/HyperwalletException.java
// public class HyperwalletException extends RuntimeException {
// 
//     private static final long serialVersionUID = 1L;
// 
//     private Response response = null;
//     private String errorMessage;
//     private String errorCode;
//     private List<String> relatedResources;
//     private HyperwalletErrorList hyperwalletErrorList;
// 
//     public HyperwalletException(final Exception e) {
//         super(e);
//     }
// 
//     public HyperwalletException(final Response response, final int code, final String message) {
//         super(message);
// 
//         this.response = response;
//         errorCode = Integer.toString(code);
//         errorMessage = message;
//     }
// 
//     public HyperwalletException(final Response response, final int code, final String message, final Exception e) {
//         super(e);
// 
//         this.response = response;
//         errorCode = Integer.toString(code);
//         errorMessage = message;
//     }
// 
//     public HyperwalletException(final Response response, final HyperwalletErrorList hyperwalletErrorList) {
//         super(hyperwalletErrorList.getErrors().get(0).getMessage());
// 
//         this.response = response;
//         this.hyperwalletErrorList = hyperwalletErrorList;
//         HyperwalletError error = this.hyperwalletErrorList.getErrors().get(0);
//         errorCode = error.getCode();
//         errorMessage = error.getMessage();
//         relatedResources = error.getRelatedResources();
//     }
// 
//     public HyperwalletException(final String errorMessage) {
//         super(errorMessage);
// 
//         this.errorMessage = errorMessage;
//     }
// 
//     public Response getResponse() {
//         return response;
//     }
// 
//     public String getErrorMessage() {
//         return errorMessage;
//     }
// 
//     public String getErrorCode() {
//         return errorCode;
//     }
// 
//     public List<String> getRelatedResources() {
//         return relatedResources;
//     }
// 
//     public List<HyperwalletError> getHyperwalletErrors() {
//         return hyperwalletErrorList != null ? hyperwalletErrorList.getErrors() : null;
//     }
// }
// 
// Path: src/main/java/com/hyperwallet/clientsdk/model/HyperwalletBaseMonitor.java
// public class HyperwalletBaseMonitor {
// 
//     @JsonIgnore
//     private Set<String> inclusions = new HashSet<String>();
// 
//     protected HyperwalletBaseMonitor() {
//     }
// 
//     public Set<String> getInclusions() {
//         return inclusions;
//     }
// 
//     protected void addField(String field, Object o) {
//         if (o == null && inclusions.contains(field)) {
//             inclusions.remove(field);
//         } else if (o != null) {
//             inclusions.add(field);
//         }
//     }
// 
//     protected void clearField(String field) {
//         inclusions.add(field);
//     }
// }


// Path: src/test/java/com/hyperwallet/clientsdk/util/HyperwalletJsonUtilTest.java
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.core.type.TypeReference;
import com.hyperwallet.clientsdk.HyperwalletException;
import com.hyperwallet.clientsdk.model.HyperwalletBaseMonitor;
import org.testng.annotations.Test;
import javax.xml.bind.Element;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;

        public void clearTest3() {
            clearField("test3");
            this.test3 = null;
        }
    }

    @JsonFilter(HyperwalletJsonConfiguration.INCLUSION_FILTER)
    @XmlRootElement
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class TestWithError extends HyperwalletBaseMonitor {
        public Element element;

        public TestWithError() {
            element = new Element() {
            };
            addField("element", element);
        }
    }

    @Test(expectedExceptions = UnsupportedOperationException.class)
    public void testInstanceCreation() {
        new HyperwalletJsonUtil();
    }

    @Test
    public void testFromJson_byClassReference_nullContent() {
        TestBody body = HyperwalletJsonUtil.fromJson(null, TestBody.class);
        assertThat(body, is(nullValue()));
    }

    @Test(expectedExceptions = HyperwalletException.class)