// Path: stardao-core/src/test/java/io/stardog/stardao/core/TestModel.java
// @AutoValue
// @JsonInclude(JsonInclude.Include.NON_NULL)
// @JsonDeserialize(builder=AutoValue_TestModel.Builder.class)
// public abstract class TestModel {
//     @Nullable
//     @Id
//     public abstract UUID getId();
// 
//     @Nullable
//     @Updatable
//     @NotEmpty(groups = Required.class)
//     public abstract String getName();
// 
//     @Nullable
//     @Updatable
//     @Email
//     @Pattern(regexp=".+@.+\\..+", message = "invalid email")
//     public abstract String getEmail();
// 
//     @Nullable
//     @Updatable
//     @NotEmpty(groups = Required.class)
//     public abstract String getCountry();
// 
//     @Nullable
//     @Updatable
//     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
//     public abstract LocalDate getBirthday();
// 
//     @Nullable
//     @Updatable
//     public abstract Boolean getActive();
// 
//     @Nullable
//     @CreatedBy
//     public abstract UUID getCreateId();
// 
//     @Nullable
//     @CreatedAt
//     public abstract Instant getCreateAt();
// 
//     @Nullable
//     @UpdatedBy
//     public abstract UUID getUpdateId();
// 
//     @Nullable
//     @UpdatedAt
//     public abstract Instant getUpdateAt();
// 
//     @Nullable
//     public abstract Instant getLoginAt();
// 
//     public Instant getLoginAt(long millis) {
//         return Instant.ofEpochMilli(millis);
//     }
// 
//     public abstract Builder toBuilder();
//     public static TestModel.Builder builder() {
//         return new AutoValue_TestModel.Builder();
//     }
// 
//     @AutoValue.Builder
//     @JsonPOJOBuilder(withPrefix = "")
//     public abstract static class Builder {
//         public abstract Builder id(UUID id);
//         public abstract Builder name(String name);
//         public abstract Builder email(String email);
//         public abstract Builder country(String state);
//         public abstract Builder birthday(LocalDate state);
//         public abstract Builder active(Boolean active);
//         public abstract Builder createAt(Instant at);
//         public abstract Builder createId(UUID id);
//         public abstract Builder updateAt(Instant at);
//         public abstract Builder updateId(UUID id);
//         public abstract Builder loginAt(Instant at);
//         public abstract TestModel build();
//     }
// }
// 
// Path: stardao-core/src/main/java/io/stardog/stardao/core/Update.java
// @AutoValue
// @JsonDeserialize(using = UpdateDeserializer.class)
// @JsonSerialize(using = UpdateSerializer.class)
// public abstract class Update<P> {
//     public abstract P getPartial();
//     public abstract Set<String> getSetFields();
//     public abstract Set<String> getRemoveFields();
// 
//     public static <T> Update<T> of(T setObject, Set<String> setFields) {
//         return new AutoValue_Update<>(setObject, setFields, ImmutableSet.of());
//     }
// 
//     public static <T> Update<T> of(T setObject, Set<String> setFields, Set<String> removeFields) {
//         return new AutoValue_Update<>(setObject, setFields, removeFields);
//     }
// 
//     public boolean isEmpty() {
//         return getSetFields().isEmpty() && getRemoveFields().isEmpty();
//     }
// 
//     public Set<String> getUpdateFields() {
//         return Sets.union(getSetFields(), getRemoveFields());
//     }
// 
//     public boolean isUpdateField(String field) {
//         return getSetFields().contains(field) || getRemoveFields().contains(field);
//     }
// }


import io.stardog.stardao.core.TestModel;
import io.stardog.stardao.core.Update;
import org.junit.Test;
import java.time.LocalDate;
import static org.junit.Assert.*;
package io.stardog.stardao.jackson;




public class JsonHelperTest {

    @Test
    public void testObject() throws Exception {
        TestModel object = JsonHelper.object("{'name':'Ian','active':true}", TestModel.class);
        assertEquals("Ian", object.getName());
    }

    @Test
    public void testUpdate() throws Exception {
// Path: stardao-core/src/test/java/io/stardog/stardao/core/TestModel.java
// @AutoValue
// @JsonInclude(JsonInclude.Include.NON_NULL)
// @JsonDeserialize(builder=AutoValue_TestModel.Builder.class)
// public abstract class TestModel {
//     @Nullable
//     @Id
//     public abstract UUID getId();
// 
//     @Nullable
//     @Updatable
//     @NotEmpty(groups = Required.class)
//     public abstract String getName();
// 
//     @Nullable
//     @Updatable
//     @Email
//     @Pattern(regexp=".+@.+\\..+", message = "invalid email")
//     public abstract String getEmail();
// 
//     @Nullable
//     @Updatable
//     @NotEmpty(groups = Required.class)
//     public abstract String getCountry();
// 
//     @Nullable
//     @Updatable
//     @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
//     public abstract LocalDate getBirthday();
// 
//     @Nullable
//     @Updatable
//     public abstract Boolean getActive();
// 
//     @Nullable
//     @CreatedBy
//     public abstract UUID getCreateId();
// 
//     @Nullable
//     @CreatedAt
//     public abstract Instant getCreateAt();
// 
//     @Nullable
//     @UpdatedBy
//     public abstract UUID getUpdateId();
// 
//     @Nullable
//     @UpdatedAt
//     public abstract Instant getUpdateAt();
// 
//     @Nullable
//     public abstract Instant getLoginAt();
// 
//     public Instant getLoginAt(long millis) {
//         return Instant.ofEpochMilli(millis);
//     }
// 
//     public abstract Builder toBuilder();
//     public static TestModel.Builder builder() {
//         return new AutoValue_TestModel.Builder();
//     }
// 
//     @AutoValue.Builder
//     @JsonPOJOBuilder(withPrefix = "")
//     public abstract static class Builder {
//         public abstract Builder id(UUID id);
//         public abstract Builder name(String name);
//         public abstract Builder email(String email);
//         public abstract Builder country(String state);
//         public abstract Builder birthday(LocalDate state);
//         public abstract Builder active(Boolean active);
//         public abstract Builder createAt(Instant at);
//         public abstract Builder createId(UUID id);
//         public abstract Builder updateAt(Instant at);
//         public abstract Builder updateId(UUID id);
//         public abstract Builder loginAt(Instant at);
//         public abstract TestModel build();
//     }
// }
// 
// Path: stardao-core/src/main/java/io/stardog/stardao/core/Update.java
// @AutoValue
// @JsonDeserialize(using = UpdateDeserializer.class)
// @JsonSerialize(using = UpdateSerializer.class)
// public abstract class Update<P> {
//     public abstract P getPartial();
//     public abstract Set<String> getSetFields();
//     public abstract Set<String> getRemoveFields();
// 
//     public static <T> Update<T> of(T setObject, Set<String> setFields) {
//         return new AutoValue_Update<>(setObject, setFields, ImmutableSet.of());
//     }
// 
//     public static <T> Update<T> of(T setObject, Set<String> setFields, Set<String> removeFields) {
//         return new AutoValue_Update<>(setObject, setFields, removeFields);
//     }
// 
//     public boolean isEmpty() {
//         return getSetFields().isEmpty() && getRemoveFields().isEmpty();
//     }
// 
//     public Set<String> getUpdateFields() {
//         return Sets.union(getSetFields(), getRemoveFields());
//     }
// 
//     public boolean isUpdateField(String field) {
//         return getSetFields().contains(field) || getRemoveFields().contains(field);
//     }
// }


// Path: stardao-core/src/test/java/io/stardog/stardao/jackson/JsonHelperTest.java
import io.stardog.stardao.core.TestModel;
import io.stardog.stardao.core.Update;
import org.junit.Test;
import java.time.LocalDate;
import static org.junit.Assert.*;

package io.stardog.stardao.jackson;




public class JsonHelperTest {

    @Test
    public void testObject() throws Exception {
        TestModel object = JsonHelper.object("{'name':'Ian','active':true}", TestModel.class);
        assertEquals("Ian", object.getName());
    }

    @Test
    public void testUpdate() throws Exception {
        Update<TestModel> update = JsonHelper.update("{'name':'Ian','active':true,email:null}", TestModel.class);