// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java
// public static class DateConverter extends LogicalTypeConverter {
//   /**
//    * Create a new DateConverter.
//    */
//   public DateConverter() {
//     super(Date.LOGICAL_NAME,
//           Schema.Type.INT32,
//           LegacySQLTypeName.DATE);
//   }
// 
//   @Override
//   public String convert(Object kafkaConnectObject) {
//     return getBQDateFormat().format((java.util.Date) kafkaConnectObject);
//   }
// }
// 
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java
// public static class DecimalConverter extends LogicalTypeConverter {
//   /**
//    * Create a new DecimalConverter.
//    */
//   public DecimalConverter() {
//     super(Decimal.LOGICAL_NAME,
//           Schema.Type.BYTES,
//           LegacySQLTypeName.FLOAT);
//   }
// 
//   @Override
//   public BigDecimal convert(Object kafkaConnectObject) {
//     // cast to get ClassCastException
//     return (BigDecimal) kafkaConnectObject;
//   }
// }
// 
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java
// public static class TimestampConverter extends LogicalTypeConverter {
//   /**
//    * Create a new TimestampConverter.
//    */
//   public TimestampConverter() {
//     super(Timestamp.LOGICAL_NAME,
//       Schema.Type.INT64,
//         LegacySQLTypeName.TIMESTAMP);
//   }
// 
//   @Override
//   public String convert(Object kafkaConnectObject) {
//     return getBqTimestampFormat().format((java.util.Date) kafkaConnectObject);
//   }
// }


import java.math.BigDecimal;
import java.util.Date;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import com.google.cloud.bigquery.LegacySQLTypeName;
import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.DateConverter;
import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.DecimalConverter;
import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.TimestampConverter;
import org.apache.kafka.connect.data.Schema;
import org.junit.Test;
package com.wepay.kafka.connect.bigquery.convert.logicaltype;

/*
 * Copyright 2016 WePay, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */








public class KafkaLogicalConvertersTest {

  //corresponds to March 1 2017, 22:20:38.808
  private static final Long TIMESTAMP = 1488406838808L;

  @Test
  public void testDateConversion() {
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java
// public static class DateConverter extends LogicalTypeConverter {
//   /**
//    * Create a new DateConverter.
//    */
//   public DateConverter() {
//     super(Date.LOGICAL_NAME,
//           Schema.Type.INT32,
//           LegacySQLTypeName.DATE);
//   }
// 
//   @Override
//   public String convert(Object kafkaConnectObject) {
//     return getBQDateFormat().format((java.util.Date) kafkaConnectObject);
//   }
// }
// 
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java
// public static class DecimalConverter extends LogicalTypeConverter {
//   /**
//    * Create a new DecimalConverter.
//    */
//   public DecimalConverter() {
//     super(Decimal.LOGICAL_NAME,
//           Schema.Type.BYTES,
//           LegacySQLTypeName.FLOAT);
//   }
// 
//   @Override
//   public BigDecimal convert(Object kafkaConnectObject) {
//     // cast to get ClassCastException
//     return (BigDecimal) kafkaConnectObject;
//   }
// }
// 
// Path: kcbq-connector/src/main/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConverters.java
// public static class TimestampConverter extends LogicalTypeConverter {
//   /**
//    * Create a new TimestampConverter.
//    */
//   public TimestampConverter() {
//     super(Timestamp.LOGICAL_NAME,
//       Schema.Type.INT64,
//         LegacySQLTypeName.TIMESTAMP);
//   }
// 
//   @Override
//   public String convert(Object kafkaConnectObject) {
//     return getBqTimestampFormat().format((java.util.Date) kafkaConnectObject);
//   }
// }


// Path: kcbq-connector/src/test/java/com/wepay/kafka/connect/bigquery/convert/logicaltype/KafkaLogicalConvertersTest.java
import java.math.BigDecimal;
import java.util.Date;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import com.google.cloud.bigquery.LegacySQLTypeName;
import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.DateConverter;
import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.DecimalConverter;
import com.wepay.kafka.connect.bigquery.convert.logicaltype.KafkaLogicalConverters.TimestampConverter;
import org.apache.kafka.connect.data.Schema;
import org.junit.Test;

package com.wepay.kafka.connect.bigquery.convert.logicaltype;

/*
 * Copyright 2016 WePay, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */








public class KafkaLogicalConvertersTest {

  //corresponds to March 1 2017, 22:20:38.808
  private static final Long TIMESTAMP = 1488406838808L;

  @Test
  public void testDateConversion() {
    DateConverter converter = new DateConverter();