### Question:
DataValueGenerator { public <T> T nativeInstance(Class<T> tClass) { try { return (T) acquireNativeClass(tClass).newInstance(); } catch (Exception e) { throw new AssertionError(e); } }  static Class firstPrimitiveFieldType(Class valueClass); static String bytesType(Class type); static String simpleName(Class<?> type); static CharSequence normalize(Class aClass); static Method getGetter(FieldModel model); static Method getVolatileGetter(FieldModel model); static Method getSetter(FieldModel model); static Method getOrderedSetter(FieldModel model); static void appendImported(SortedSet<Class> imported, StringBuilder sb); static void appendPackage(DataValueModel<?> dvmodel, StringBuilder sb); static String getPackage(DataValueModel<?> dvmodel); static int fieldSize(FieldModel model); static TreeSet<Class> newImported(); static boolean shouldImport(Class type); static Map.Entry<String, FieldModel>[] heapSizeOrderedFieldsGrouped(DataValueModel<?> dvmodel); static int computeOffset(int offset, FieldModel model); static int computeNonScalarOffset(DataValueModel dvmodel, Class type); T heapInstance(Class<T> tClass); Class acquireHeapClass(Class<T> tClass); T nativeInstance(Class<T> tClass); Class acquireNativeClass(Class<T> tClass); String generateNativeObject(Class<?> tClass); String generateNativeObject(DataValueModel<?> dvmodel); boolean isDumpCode(); void setDumpCode(boolean dumpCode);  }### Answer:
@Test public void testGenerateInterfaceWithEnumNativeInstance() { DataValueGenerator dvg = new DataValueGenerator(); JavaBeanInterfaceGetMyEnum jbie = dvg.nativeInstance(JavaBeanInterfaceGetMyEnum.class); Bytes bytes = ByteBufferBytes.wrap(ByteBuffer.allocate(64)); ((Byteable) jbie).bytes(bytes, 0L); jbie.setMyEnum(MyEnum.C); }
@Test public void testGenerateInterfaceWithDateNativeInstace() { DataValueGenerator dvg = new DataValueGenerator(); JavaBeanInterfaceGetDate jbid = dvg.nativeInstance(JavaBeanInterfaceGetDate.class); Bytes bytes = ByteBufferBytes.wrap(ByteBuffer.allocate(64)); ((Byteable) jbid).bytes(bytes, 0L); jbid.setDate(new Date()); assertEquals(new Date(), jbid.getDate()); }