### Question:
SerializationUtil { static public <S extends Serializable> S clone(S object) throws ClassNotFoundException, IOException { return clone(object, null); } private  SerializationUtil(); static PMML deserializePMML(InputStream is); static PMML deserializePMML(InputStream is, ClassLoader clazzLoader); static Object deserialize(InputStream is); static Object deserialize(InputStream is, ClassLoader clazzLoader); static void serializePMML(PMML pmml, OutputStream os); static void serialize(S object, OutputStream os); static S clone(S object); @SuppressWarnings ( value = {"unchecked"} ) static S clone(S object, ClassLoader clazzLoader);  }### Answer:
@Test public void nullifyAndClone() throws Exception { PMML pmml = ResourceUtil.unmarshal(Version.PMML_4_4); assertNotNull(pmml.getLocator()); try { SerializationUtil.clone(pmml); fail(); } catch(NotSerializableException nse){ } pmml.accept(new LocatorNullifier()); assertNull(pmml.getLocator()); SerializationUtil.clone(pmml); }
@Test public void transformAndClone() throws Exception { PMML pmml = ResourceUtil.unmarshal(Version.PMML_4_4); assertNotNull(pmml.getLocator()); try { SerializationUtil.clone(pmml); fail(); } catch(NotSerializableException nse){ } pmml.accept(new LocatorTransformer()); assertNotNull(pmml.getLocator()); SerializationUtil.clone(pmml); }