// Path: src/main/java/org/killbill/billing/plugin/simpletax/util/ImmutableCustomField.java
// public static Builder builder() {
//     return new Builder();
// }
// 
// Path: src/main/java/org/killbill/billing/plugin/simpletax/util/ImmutableCustomField.java
// public static class Builder {
// 
//     private UUID id;
//     private DateTime createdDate, updatedDate;
//     private UUID objectId;
//     private ObjectType objectType;
//     private String fieldName, fieldValue;
// 
//     private Builder() {
//         super();
//         id = randomUUID();
//         createdDate = now();
//         updatedDate = now();
//     }
// 
//     private Builder(CustomField src) {
//         this();
//         id = src.getId();
//         createdDate = src.getCreatedDate();
//         updatedDate = src.getUpdatedDate();
//         objectId = src.getObjectId();
//         objectType = src.getObjectType();
//         fieldName = src.getFieldName();
//         fieldValue = src.getFieldValue();
//     }
// 
//     /**
//      * @return A new {@link ImmutableCustomField}, with the properties set
//      *         in this builder.
//      */
//     public CustomField build() {
//         ImmutableCustomField taxField = new ImmutableCustomField();
//         taxField.id = id;
//         taxField.createdDate = createdDate;
//         taxField.updatedDate = updatedDate;
//         taxField.objectId = objectId;
//         taxField.objectType = objectType;
//         taxField.fieldName = fieldName;
//         taxField.fieldValue = fieldValue;
//         return taxField;
//     }
// 
//     /**
//      * @param objectId
//      *            The object identifier to use.
//      * @return this builder
//      */
//     public Builder withObjectId(UUID objectId) {
//         this.objectId = objectId;
//         updatedDate = now();
//         return this;
//     }
// 
//     /**
//      * @param objectType
//      *            The object type to use.
//      * @return this builder
//      */
//     public Builder withObjectType(ObjectType objectType) {
//         this.objectType = objectType;
//         updatedDate = now();
//         return this;
//     }
// 
//     /**
//      * @param fieldName
//      *            The field name to use.
//      * @return this builder
//      */
//     public Builder withFieldName(String fieldName) {
//         this.fieldName = fieldName;
//         updatedDate = now();
//         return this;
//     }
// 
//     /**
//      * @param fieldValue
//      *            The field value to use.
//      * @return this builder
//      */
//     public Builder withFieldValue(String fieldValue) {
//         this.fieldValue = fieldValue;
//         updatedDate = now();
//         return this;
//     }
// }


import static java.lang.Thread.sleep;
import static org.killbill.billing.ObjectType.INVOICE_ITEM;
import static org.killbill.billing.plugin.simpletax.util.ImmutableCustomField.builder;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNotSame;
import java.util.UUID;
import org.killbill.billing.plugin.simpletax.util.ImmutableCustomField.Builder;
import org.killbill.billing.util.customfield.CustomField;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
        } catch (InterruptedException exc) {
            throw new RuntimeException(exc);
        }
    }

    @Test(groups = "fast")
    public void shouldCopyExistingCustomField() {
        // Given
        CustomField fieldA = builderA.build();
        Builder builderB = builder(fieldA);

        // When
        CustomField fieldB = builderB.build();

        // Then
        assertNotNull(fieldB);
        assertNotSame(fieldB, fieldA);
        assertEquals(fieldB.getId(), fieldA.getId());
        assertEquals(fieldB.getCreatedDate(), fieldA.getCreatedDate());
        assertEquals(fieldB.getUpdatedDate(), fieldA.getUpdatedDate());
        assertEquals(fieldB.getObjectType(), fieldA.getObjectType());
        assertEquals(fieldB.getObjectId(), fieldA.getObjectId());
        assertEquals(fieldB.getFieldName(), fieldA.getFieldName());
        assertEquals(fieldB.getFieldValue(), fieldA.getFieldValue());
    }

    @Test(groups = "fast")
    public void shouldCopyExistingCustomFieldAndCustomize() {
        // Given
        CustomField fieldA = builderA.build();
// Path: src/main/java/org/killbill/billing/plugin/simpletax/util/ImmutableCustomField.java
// public static Builder builder() {
//     return new Builder();
// }
// 
// Path: src/main/java/org/killbill/billing/plugin/simpletax/util/ImmutableCustomField.java
// public static class Builder {
// 
//     private UUID id;
//     private DateTime createdDate, updatedDate;
//     private UUID objectId;
//     private ObjectType objectType;
//     private String fieldName, fieldValue;
// 
//     private Builder() {
//         super();
//         id = randomUUID();
//         createdDate = now();
//         updatedDate = now();
//     }
// 
//     private Builder(CustomField src) {
//         this();
//         id = src.getId();
//         createdDate = src.getCreatedDate();
//         updatedDate = src.getUpdatedDate();
//         objectId = src.getObjectId();
//         objectType = src.getObjectType();
//         fieldName = src.getFieldName();
//         fieldValue = src.getFieldValue();
//     }
// 
//     /**
//      * @return A new {@link ImmutableCustomField}, with the properties set
//      *         in this builder.
//      */
//     public CustomField build() {
//         ImmutableCustomField taxField = new ImmutableCustomField();
//         taxField.id = id;
//         taxField.createdDate = createdDate;
//         taxField.updatedDate = updatedDate;
//         taxField.objectId = objectId;
//         taxField.objectType = objectType;
//         taxField.fieldName = fieldName;
//         taxField.fieldValue = fieldValue;
//         return taxField;
//     }
// 
//     /**
//      * @param objectId
//      *            The object identifier to use.
//      * @return this builder
//      */
//     public Builder withObjectId(UUID objectId) {
//         this.objectId = objectId;
//         updatedDate = now();
//         return this;
//     }
// 
//     /**
//      * @param objectType
//      *            The object type to use.
//      * @return this builder
//      */
//     public Builder withObjectType(ObjectType objectType) {
//         this.objectType = objectType;
//         updatedDate = now();
//         return this;
//     }
// 
//     /**
//      * @param fieldName
//      *            The field name to use.
//      * @return this builder
//      */
//     public Builder withFieldName(String fieldName) {
//         this.fieldName = fieldName;
//         updatedDate = now();
//         return this;
//     }
// 
//     /**
//      * @param fieldValue
//      *            The field value to use.
//      * @return this builder
//      */
//     public Builder withFieldValue(String fieldValue) {
//         this.fieldValue = fieldValue;
//         updatedDate = now();
//         return this;
//     }
// }


// Path: src/test/java/org/killbill/billing/plugin/simpletax/util/TestImmutableCustomField.java
import static java.lang.Thread.sleep;
import static org.killbill.billing.ObjectType.INVOICE_ITEM;
import static org.killbill.billing.plugin.simpletax.util.ImmutableCustomField.builder;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertNotSame;
import java.util.UUID;
import org.killbill.billing.plugin.simpletax.util.ImmutableCustomField.Builder;
import org.killbill.billing.util.customfield.CustomField;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

        } catch (InterruptedException exc) {
            throw new RuntimeException(exc);
        }
    }

    @Test(groups = "fast")
    public void shouldCopyExistingCustomField() {
        // Given
        CustomField fieldA = builderA.build();
        Builder builderB = builder(fieldA);

        // When
        CustomField fieldB = builderB.build();

        // Then
        assertNotNull(fieldB);
        assertNotSame(fieldB, fieldA);
        assertEquals(fieldB.getId(), fieldA.getId());
        assertEquals(fieldB.getCreatedDate(), fieldA.getCreatedDate());
        assertEquals(fieldB.getUpdatedDate(), fieldA.getUpdatedDate());
        assertEquals(fieldB.getObjectType(), fieldA.getObjectType());
        assertEquals(fieldB.getObjectId(), fieldA.getObjectId());
        assertEquals(fieldB.getFieldName(), fieldA.getFieldName());
        assertEquals(fieldB.getFieldValue(), fieldA.getFieldValue());
    }

    @Test(groups = "fast")
    public void shouldCopyExistingCustomFieldAndCustomize() {
        // Given
        CustomField fieldA = builderA.build();
        Builder builderB = builder(fieldA);