### Question:
SpecificCompiler { public String javaType(Schema schema) { return javaType(schema, true); } SpecificCompiler(Protocol protocol);  SpecificCompiler(Schema schema);   SpecificCompiler(); boolean isCreateAllArgsConstructor(); void setAdditionalVelocityTools(List<Object> additionalVelocityTools); void setTemplateDir(String templateDir); void setSuffix(String suffix); boolean deprecatedFields(); boolean publicFields(); boolean privateFields(); void setFieldVisibility(FieldVisibility fieldVisibility); boolean isCreateSetters(); void setCreateSetters(boolean createSetters); boolean isCreateOptionalGetters(); void setCreateOptionalGetters(boolean createOptionalGetters); boolean isGettersReturnOptional(); void setGettersReturnOptional(boolean gettersReturnOptional); boolean isOptionalGettersForNullableFieldsOnly(); void setOptionalGettersForNullableFieldsOnly(boolean optionalGettersForNullableFieldsOnly); void setEnableDecimalLogicalType(boolean enableDecimalLogicalType); void addCustomConversion(Class<?> conversionClass); Collection<String> getUsedConversionClasses(Schema schema); static void compileProtocol(File src, File dest); static void compileProtocol(File[] srcFiles, File dest); static void compileSchema(File src, File dest); static void compileSchema(File[] srcFiles, File dest); void compileToDestination(File src, File dst); void setStringType(StringType t); String getStringType(Schema s); boolean isStringable(Schema schema); String javaType(Schema schema); String generateSetterCode(Schema schema, String name, String pname); @Deprecated String javaUnbox(Schema schema); String javaUnbox(Schema schema, boolean unboxNullToVoid); String indent(int n); int getNonNullIndex(Schema s); boolean isCustomCodable(Schema schema); boolean hasLogicalTypeField(Schema schema); String conversionInstance(Schema schema); String[] javaAnnotations(JsonProperties props); String javaSplit(String s); static String javaEscape(String o); static String escapeForJavadoc(String s); static String nullToEmpty(String x); static String mangle(String word); static String mangle(String word, boolean isError); static String mangle(String word, Set<String> reservedWords); static String mangle(String word, Set<String> reservedWords, boolean isMethod); static long fingerprint64(Schema schema); static String generateGetMethod(Schema schema, Field field); static String generateGetOptionalMethod(Schema schema, Field field); static String generateSetMethod(Schema schema, Field field); static String generateHasMethod(Schema schema, Field field); static String generateClearMethod(Schema schema, Field field); static boolean hasBuilder(Schema schema); static String generateGetBuilderMethod(Schema schema, Field field); static String generateSetBuilderMethod(Schema schema, Field field); static String generateHasBuilderMethod(Schema schema, Field field); static boolean isUnboxedJavaTypeNullable(Schema schema); static void main(String[] args); void setOutputCharacterEncoding(String outputCharacterEncoding);  }### Answer:
@Test public void testJavaTypeWithDateTimeTypes() throws Exception { SpecificCompiler compiler = createCompiler(); Schema dateSchema = LogicalTypes.date().addToSchema(Schema.create(Schema.Type.INT)); Schema timeSchema = LogicalTypes.timeMillis().addToSchema(Schema.create(Schema.Type.INT)); Schema timeMicrosSchema = LogicalTypes.timeMicros().addToSchema(Schema.create(Schema.Type.LONG)); Schema timestampSchema = LogicalTypes.timestampMillis().addToSchema(Schema.create(Schema.Type.LONG)); Schema timestampMicrosSchema = LogicalTypes.timestampMicros().addToSchema(Schema.create(Schema.Type.LONG)); Assert.assertEquals("Should use java.time.LocalDate for date type", "java.time.LocalDate", compiler.javaType(dateSchema)); Assert.assertEquals("Should use java.time.LocalTime for time-millis type", "java.time.LocalTime", compiler.javaType(timeSchema)); Assert.assertEquals("Should use java.time.Instant for timestamp-millis type", "java.time.Instant", compiler.javaType(timestampSchema)); Assert.assertEquals("Should use java.time.LocalTime for time-micros type", "java.time.LocalTime", compiler.javaType(timeMicrosSchema)); Assert.assertEquals("Should use java.time.Instant for timestamp-micros type", "java.time.Instant", compiler.javaType(timestampMicrosSchema)); }