// Path: hibernate/src/main/java/net/sf/beanlib/hibernate5/Hibernate5BeanReplicator.java
// public class Hibernate5BeanReplicator extends HibernateBeanReplicator {
// 
//     /**
//      * By default, all properties will be included for replication.
//      */
//     public Hibernate5BeanReplicator() {
//         super(new Hibernate5BeanTransformer().initPropertyFilter(new HibernatePropertyFilter()));
//     }
// 
//     /**
//      * Constructs with an application package prefix.
//      *
//      * @param applicationPackagePrefix An application package prefix used to determine if a property with a type of an
//      *            entity bean class will be included for replication.
//      */
//     public Hibernate5BeanReplicator(String applicationPackagePrefix) {
//         super(new Hibernate5BeanTransformer().initPropertyFilter(new HibernatePropertyFilter(applicationPackagePrefix)));
//     }
// 
//     /**
//      * Convenient constructor to specify:
//      * <ol>
//      * <li>The set of entity bean classes for matching properties that will be replicated;</li>
//      * <li>The set of collection and map properties that will be replicated;</li>
//      * <li>A {@link PropertyFilter vetoer} used to veto the propagation of specific properties</li>
//      * </ol>
//      * <p>
//      * Note this constructor is relevant only if the default property filter {@link HibernatePropertyFilter} is used.
//      *
//      * @param entityBeanClassSet The set of entity bean classes for matching properties that will be replicated, eagerly
//      *            fetching if necessary. Null means all whereas empty means none.
//      * @param collectionPropertyNameSet The set of collection and map properties that will be replicated, eagerly
//      *            fetching if necessary. Null means all whereas empty means none.
//      * @param vetoer used to veto the propagation of specific properties.
//      */
//     public Hibernate5BeanReplicator(Set<Class<?>> entityBeanClassSet, Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet,
//             PropertyFilter vetoer) {
//         super(new Hibernate5BeanTransformer().initPropertyFilter(new HibernatePropertyFilter().withEntityBeanClassSet(entityBeanClassSet)
//                 .withCollectionPropertyNameSet(collectionPropertyNameSet).withVetoer(vetoer)));
//     }
// 
//     /**
//      * Convenient constructor to specify:
//      * <ol>
//      * <li>An application package prefix used to determine if a property with a type of an entity bean class will be
//      * included for replication;</li>
//      * <li>The set of entity bean classes for matching properties that will be replicated;</li>
//      * <li>The set of collection and map properties that will be replicated;</li>
//      * <li>A {@link PropertyFilter vetoer} used to veto the propagation of specific properties</li>
//      * </ol>
//      * <p>
//      * Note this constructor is relevant only if the default property filter {@link HibernatePropertyFilter} is used.
//      *
//      * @param entityBeanClassSet The set of entity bean classes for matching properties that will be replicated, eagerly
//      *            fetching if necessary. Null means all whereas empty means none.
//      * @param collectionPropertyNameSet The set of collection and map properties that will be replicated, eagerly
//      *            fetching if necessary. Null means all whereas empty means none.
//      * @param vetoer used to veto the propagation of specific properties.
//      */
//     public Hibernate5BeanReplicator(String applicationPackagePrefix, Set<Class<?>> entityBeanClassSet,
//             Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet, PropertyFilter vetoer) {
//         super(new Hibernate5BeanTransformer().initPropertyFilter(new HibernatePropertyFilter(applicationPackagePrefix)
//                 .withEntityBeanClassSet(entityBeanClassSet).withCollectionPropertyNameSet(collectionPropertyNameSet).withVetoer(vetoer)));
//     }
// }


import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.sameInstance;
import static org.junit.Assert.assertThat;
import java.util.Calendar;
import org.junit.Test;
import junit.framework.JUnit4TestAdapter;
import net.sf.beanlib.hibernate5.Hibernate5BeanReplicator;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj instanceof CalendarBean) {
                CalendarBean that = (CalendarBean) obj;
                return calendar == null ? that.getCalendar() == null : calendar.equals(that.getCalendar());
            }
            return false;
        }
    }

    @Test
    public void testBeanReplicator() {
        CalendarBean from = new CalendarBean();
        from.setCalendar(Calendar.getInstance());
        from.setCalendar2(from.getCalendar());
        CalendarBean to = new BeanReplicator().replicateBean(from);

        assertThat(from, not(sameInstance(to)));
        assertThat(from.getCalendar(), not(sameInstance(to.getCalendar())));
        assertThat(from, is(to));
        assertThat(from.getCalendar(), sameInstance(from.getCalendar2()));
        assertThat(to.getCalendar(), sameInstance(to.getCalendar2()));
    }

    @Test
    public void testHibernate3BeanReplicator() {
        CalendarBean from = new CalendarBean();
        from.setCalendar(Calendar.getInstance());
// Path: hibernate/src/main/java/net/sf/beanlib/hibernate5/Hibernate5BeanReplicator.java
// public class Hibernate5BeanReplicator extends HibernateBeanReplicator {
// 
//     /**
//      * By default, all properties will be included for replication.
//      */
//     public Hibernate5BeanReplicator() {
//         super(new Hibernate5BeanTransformer().initPropertyFilter(new HibernatePropertyFilter()));
//     }
// 
//     /**
//      * Constructs with an application package prefix.
//      *
//      * @param applicationPackagePrefix An application package prefix used to determine if a property with a type of an
//      *            entity bean class will be included for replication.
//      */
//     public Hibernate5BeanReplicator(String applicationPackagePrefix) {
//         super(new Hibernate5BeanTransformer().initPropertyFilter(new HibernatePropertyFilter(applicationPackagePrefix)));
//     }
// 
//     /**
//      * Convenient constructor to specify:
//      * <ol>
//      * <li>The set of entity bean classes for matching properties that will be replicated;</li>
//      * <li>The set of collection and map properties that will be replicated;</li>
//      * <li>A {@link PropertyFilter vetoer} used to veto the propagation of specific properties</li>
//      * </ol>
//      * <p>
//      * Note this constructor is relevant only if the default property filter {@link HibernatePropertyFilter} is used.
//      *
//      * @param entityBeanClassSet The set of entity bean classes for matching properties that will be replicated, eagerly
//      *            fetching if necessary. Null means all whereas empty means none.
//      * @param collectionPropertyNameSet The set of collection and map properties that will be replicated, eagerly
//      *            fetching if necessary. Null means all whereas empty means none.
//      * @param vetoer used to veto the propagation of specific properties.
//      */
//     public Hibernate5BeanReplicator(Set<Class<?>> entityBeanClassSet, Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet,
//             PropertyFilter vetoer) {
//         super(new Hibernate5BeanTransformer().initPropertyFilter(new HibernatePropertyFilter().withEntityBeanClassSet(entityBeanClassSet)
//                 .withCollectionPropertyNameSet(collectionPropertyNameSet).withVetoer(vetoer)));
//     }
// 
//     /**
//      * Convenient constructor to specify:
//      * <ol>
//      * <li>An application package prefix used to determine if a property with a type of an entity bean class will be
//      * included for replication;</li>
//      * <li>The set of entity bean classes for matching properties that will be replicated;</li>
//      * <li>The set of collection and map properties that will be replicated;</li>
//      * <li>A {@link PropertyFilter vetoer} used to veto the propagation of specific properties</li>
//      * </ol>
//      * <p>
//      * Note this constructor is relevant only if the default property filter {@link HibernatePropertyFilter} is used.
//      *
//      * @param entityBeanClassSet The set of entity bean classes for matching properties that will be replicated, eagerly
//      *            fetching if necessary. Null means all whereas empty means none.
//      * @param collectionPropertyNameSet The set of collection and map properties that will be replicated, eagerly
//      *            fetching if necessary. Null means all whereas empty means none.
//      * @param vetoer used to veto the propagation of specific properties.
//      */
//     public Hibernate5BeanReplicator(String applicationPackagePrefix, Set<Class<?>> entityBeanClassSet,
//             Set<? extends CollectionPropertyName<?>> collectionPropertyNameSet, PropertyFilter vetoer) {
//         super(new Hibernate5BeanTransformer().initPropertyFilter(new HibernatePropertyFilter(applicationPackagePrefix)
//                 .withEntityBeanClassSet(entityBeanClassSet).withCollectionPropertyNameSet(collectionPropertyNameSet).withVetoer(vetoer)));
//     }
// }


// Path: hibernate/src/test/java/net/sf/beanlib/provider/replicator/CalendarReplicatorTest.java
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.sameInstance;
import static org.junit.Assert.assertThat;
import java.util.Calendar;
import org.junit.Test;
import junit.framework.JUnit4TestAdapter;
import net.sf.beanlib.hibernate5.Hibernate5BeanReplicator;

        }

        @Override
        public boolean equals(Object obj) {
            if (obj instanceof CalendarBean) {
                CalendarBean that = (CalendarBean) obj;
                return calendar == null ? that.getCalendar() == null : calendar.equals(that.getCalendar());
            }
            return false;
        }
    }

    @Test
    public void testBeanReplicator() {
        CalendarBean from = new CalendarBean();
        from.setCalendar(Calendar.getInstance());
        from.setCalendar2(from.getCalendar());
        CalendarBean to = new BeanReplicator().replicateBean(from);

        assertThat(from, not(sameInstance(to)));
        assertThat(from.getCalendar(), not(sameInstance(to.getCalendar())));
        assertThat(from, is(to));
        assertThat(from.getCalendar(), sameInstance(from.getCalendar2()));
        assertThat(to.getCalendar(), sameInstance(to.getCalendar2()));
    }

    @Test
    public void testHibernate3BeanReplicator() {
        CalendarBean from = new CalendarBean();
        from.setCalendar(Calendar.getInstance());
        CalendarBean to = new Hibernate5BeanReplicator().copy(from);