@Test
public void testSet() throws Exception {

  Foo foo = new Foo();
  FooGenericWritable generic = new FooGenericWritable();
  //exception should not occur
  generic.set(foo);
  try {
    //exception should occur, since IntWritable is not registered
    generic = new FooGenericWritable();
    generic.set(new IntWritable(1));
    fail("Generic writable should have thrown an exception for a Writable not registered");
  }catch (RuntimeException e) {
    //ignore
  }
}