// Path: src/main/java/com/knewton/mapreduce/constant/PropertyConstants.java
// public enum PropertyConstants {
// 
//     /**
//      * The Keyspace Name for a data run
//      */
//     KEYSPACE_NAME("com.knewton.inputformat.cassandra.keyspace"),
//     /**
//      * Column family type needs to be set if the column family type is Super.
//      */
//     COLUMN_FAMILY_TYPE("com.knewton.cassandra.cftype"),
//     /**
//      * Comparator class name for columns.
//      */
//     COLUMN_COMPARATOR("com.knewton.cassandra.column.comparator"),
//     /**
//      * A nonstandard comparator requires a subcomparator
//      */
//     COLUMN_SUBCOMPARATOR("com.knewton.cassandra.column.subcomparator"),
//     /**
//      * Partitioner for decorating keys.
//      */
//     PARTITIONER("com.knewton.partitioner"),
//     /**
//      * True if the columns are sparse, false if they're dense.
//      */
//     SPARSE_COLUMN("com.knewton.column.sparse"),
//     /**
//      * Boolean variable. Set true if compression enabled.
//      */
//     COMPRESSION_ENABLED("com.knewton.cassandra.backup.compression"),
//     /**
//      * Buffer size for decompression operation.
//      */
//     DECOMPRESS_BUFFER("com.knewton.cassandra.backup.compress.buffersize"),
//     /**
//      * Start and end dates for student events processing
//      */
//     START_DATE("com.knewton.studentevents.date.start"),
//     END_DATE("com.knewton.studentevents.date.end"),
//     /**
//      * The Column Family Name for a data run
//      */
//     COLUMN_FAMILY_NAME("com.knewton.inputformat.cassandra.columnfamily"),
//     /**
//      * MapReduce run environment. Should be one of the enum values in MREnvironment.java
//      */
//     MAPREDUCE_ENVIRONMENT("com.knewton.mapreduce.environment"),
//     /**
//      * Name of serialization factory class
//      */
//     SERIALIZATION_FACTORY_PARAMETER("com.knewton.thrift.serialization.protocol");
// 
//     public final String txt;
// 
//     private PropertyConstants(String propertyName) {
//         this.txt = propertyName;
//     }
// }


import com.knewton.mapreduce.constant.PropertyConstants;
import org.apache.hadoop.conf.Configuration;
import org.apache.thrift.TDeserializer;
import org.apache.thrift.protocol.TCompactProtocol;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;
/**
 * Copyright 2013, 2014, 2015 Knewton
 *
 * 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.
 *
 */
package com.knewton.mapreduce.util;




public class SerializationUtilsTest {

    /**
     * Test if a deserializer can be instantiated correctly from a Hadoop conf property.
     */
    @Test
    public void testGetDeserializerFromConf() throws Exception {
        Configuration conf = new Configuration(false);
// Path: src/main/java/com/knewton/mapreduce/constant/PropertyConstants.java
// public enum PropertyConstants {
// 
//     /**
//      * The Keyspace Name for a data run
//      */
//     KEYSPACE_NAME("com.knewton.inputformat.cassandra.keyspace"),
//     /**
//      * Column family type needs to be set if the column family type is Super.
//      */
//     COLUMN_FAMILY_TYPE("com.knewton.cassandra.cftype"),
//     /**
//      * Comparator class name for columns.
//      */
//     COLUMN_COMPARATOR("com.knewton.cassandra.column.comparator"),
//     /**
//      * A nonstandard comparator requires a subcomparator
//      */
//     COLUMN_SUBCOMPARATOR("com.knewton.cassandra.column.subcomparator"),
//     /**
//      * Partitioner for decorating keys.
//      */
//     PARTITIONER("com.knewton.partitioner"),
//     /**
//      * True if the columns are sparse, false if they're dense.
//      */
//     SPARSE_COLUMN("com.knewton.column.sparse"),
//     /**
//      * Boolean variable. Set true if compression enabled.
//      */
//     COMPRESSION_ENABLED("com.knewton.cassandra.backup.compression"),
//     /**
//      * Buffer size for decompression operation.
//      */
//     DECOMPRESS_BUFFER("com.knewton.cassandra.backup.compress.buffersize"),
//     /**
//      * Start and end dates for student events processing
//      */
//     START_DATE("com.knewton.studentevents.date.start"),
//     END_DATE("com.knewton.studentevents.date.end"),
//     /**
//      * The Column Family Name for a data run
//      */
//     COLUMN_FAMILY_NAME("com.knewton.inputformat.cassandra.columnfamily"),
//     /**
//      * MapReduce run environment. Should be one of the enum values in MREnvironment.java
//      */
//     MAPREDUCE_ENVIRONMENT("com.knewton.mapreduce.environment"),
//     /**
//      * Name of serialization factory class
//      */
//     SERIALIZATION_FACTORY_PARAMETER("com.knewton.thrift.serialization.protocol");
// 
//     public final String txt;
// 
//     private PropertyConstants(String propertyName) {
//         this.txt = propertyName;
//     }
// }


// Path: src/test/java/com/knewton/mapreduce/util/SerializationUtilsTest.java
import com.knewton.mapreduce.constant.PropertyConstants;
import org.apache.hadoop.conf.Configuration;
import org.apache.thrift.TDeserializer;
import org.apache.thrift.protocol.TCompactProtocol;
import org.junit.Test;
import static org.junit.Assert.assertNotNull;

/**
 * Copyright 2013, 2014, 2015 Knewton
 *
 * 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.
 *
 */
package com.knewton.mapreduce.util;




public class SerializationUtilsTest {

    /**
     * Test if a deserializer can be instantiated correctly from a Hadoop conf property.
     */
    @Test
    public void testGetDeserializerFromConf() throws Exception {
        Configuration conf = new Configuration(false);
        conf.set(PropertyConstants.SERIALIZATION_FACTORY_PARAMETER.txt,