### Question:
IcebergDateObjectInspector extends AbstractPrimitiveJavaObjectInspector implements DateObjectInspector { private IcebergDateObjectInspector() { super(TypeInfoFactory.dateTypeInfo); } private  IcebergDateObjectInspector(); static IcebergDateObjectInspector get(); @Override Date getPrimitiveJavaObject(Object o); @Override DateWritable getPrimitiveWritableObject(Object o); @Override Object copyObject(Object o);  }### Answer:
@Test public void testIcebergDateObjectInspector() { DateObjectInspector oi = IcebergDateObjectInspector.get(); Assert.assertEquals(ObjectInspector.Category.PRIMITIVE, oi.getCategory()); Assert.assertEquals(PrimitiveObjectInspector.PrimitiveCategory.DATE, oi.getPrimitiveCategory()); Assert.assertEquals(TypeInfoFactory.dateTypeInfo, oi.getTypeInfo()); Assert.assertEquals(TypeInfoFactory.dateTypeInfo.getTypeName(), oi.getTypeName()); Assert.assertEquals(Date.class, oi.getJavaPrimitiveClass()); Assert.assertEquals(DateWritable.class, oi.getPrimitiveWritableClass()); Assert.assertNull(oi.copyObject(null)); Assert.assertNull(oi.getPrimitiveJavaObject(null)); Assert.assertNull(oi.getPrimitiveWritableObject(null)); LocalDate local = LocalDate.of(2020, 1, 1); Date date = Date.valueOf("2020-01-01"); Assert.assertEquals(date, oi.getPrimitiveJavaObject(local)); Assert.assertEquals(new DateWritable(date), oi.getPrimitiveWritableObject(local)); Date copy = (Date) oi.copyObject(date); Assert.assertEquals(date, copy); Assert.assertNotSame(date, copy); Assert.assertFalse(oi.preferWritable()); }