private IcebergDateObjectInspector() {
    super(TypeInfoFactory.dateTypeInfo);
  }
@Test
  public void testIcebergDateObjectInspector() {
    DateObjectInspector oi = IcebergDateObjectInspector.get();

    assertThat(oi.getCategory()).isEqualTo(ObjectInspector.Category.PRIMITIVE);
    assertThat(oi.getPrimitiveCategory())
        .isEqualTo(PrimitiveObjectInspector.PrimitiveCategory.DATE);

    assertThat(oi.getTypeInfo()).isEqualTo(TypeInfoFactory.dateTypeInfo);
    assertThat(oi.getTypeName()).isEqualTo(TypeInfoFactory.dateTypeInfo.getTypeName());

    assertThat(oi.getJavaPrimitiveClass()).isEqualTo(Date.class);
    assertThat(oi.getPrimitiveWritableClass()).isEqualTo(DateWritable.class);

    assertThat(oi.copyObject(null)).isNull();
    assertThat(oi.getPrimitiveJavaObject(null)).isNull();
    assertThat(oi.getPrimitiveWritableObject(null)).isNull();

    LocalDate local = LocalDate.of(2020, 1, 1);
    Date date = Date.valueOf("2020-01-01");

    assertThat(oi.getPrimitiveJavaObject(local)).isEqualTo(date);
    assertThat(oi.getPrimitiveWritableObject(local)).isEqualTo(new DateWritable(date));

    Date copy = (Date) oi.copyObject(date);

    assertThat(copy).isEqualTo(date);
    assertThat(copy).isNotSameAs(date);

    assertThat(oi.preferWritable()).isFalse();
  }