@Test public void testWritableConfigurable() throws Exception { //set the configuration parameter conf.set(CONF_TEST_KEY, CONF_TEST_VALUE); //reuse TestGenericWritable inner classes to test //writables that also implement Configurable. FooGenericWritable generic = new FooGenericWritable(); generic.setConf(conf); Baz baz = new Baz(); generic.set(baz); Baz result = SerializationTestUtil.testSerialization(conf, baz); assertEquals(baz, result); assertNotNull(result.getConf()); }
public void testWritableConfigurable() throws Exception { //set the configuration parameter conf.set(CONF_TEST_KEY, CONF_TEST_VALUE); //reuse TestGenericWritable inner classes to test //writables that also implement Configurable. FooGenericWritable generic = new FooGenericWritable(); generic.setConf(conf); Baz baz = new Baz(); generic.set(baz); Baz result = testSerialization(conf, baz); assertNotNull(result.getConf()); }