DateInstanceBuilder extends AbstractInstanceBuilder { @Override Object buildClone(Object cloneOwner, Field field, Object original, CloneConfiguration config) { if (original == null) { return null; } final Date orig = (Date) original; return new Date(orig.getTime()); } DateInstanceBuilder(CloneBuilderImpl builder, UnitOfWorkImpl uow);   }
@Test void testBuildClone() { final Date original = new Date(); final Object res = builder.buildClone(entityM, dateField, original, new CloneConfiguration(descriptor)); assertTrue(res instanceof Date); assertNotSame(original, res); assertEquals(original, res); }
@Test void testBuildCloneOfNull() { final Object res = builder.buildClone(entityM, dateField, null, new CloneConfiguration(descriptor)); assertNull(res); }