public <T> Serializer<T> getSerializer(Class<T> c) {
    Serialization<T> serializer = getSerialization(c);
    if (serializer != null) {
      return serializer.getSerializer(c);
    }
    return null;
  }
@Test
  public void testSerializationKeyIsTrimmed() {
    Configuration conf = new Configuration();
    conf.set(CommonConfigurationKeys.IO_SERIALIZATIONS_KEY, " org.apache.hadoop.io.serializer.WritableSerialization ");
    SerializationFactory factory = new SerializationFactory(conf);
    assertNotNull("Valid class must be returned",
     factory.getSerializer(LongWritable.class));
   }