@Test public void cloneMethod_shouldCorrectlyCloneObject() { SimpleObject expected = SimpleObjectMother.createInstanceWithDateChanged( TEST_DATE_CHANGE, true, true); SimpleObject actual = SimpleObjectSerializationUtils.clone(expected); Assert.assertNotNull(actual); Assert.assertEquals(expected, actual); }
public static SimpleObject clone(SimpleObject simpleObject) { String stringRepresentation = serialize(simpleObject); return deserialize(stringRepresentation); }
SimpleObjectSerializationUtils { public static SimpleObject clone(SimpleObject simpleObject) { String stringRepresentation = serialize(simpleObject); return deserialize(stringRepresentation); } }
SimpleObjectSerializationUtils { public static SimpleObject clone(SimpleObject simpleObject) { String stringRepresentation = serialize(simpleObject); return deserialize(stringRepresentation); } private  SimpleObjectSerializationUtils(); }
SimpleObjectSerializationUtils { public static SimpleObject clone(SimpleObject simpleObject) { String stringRepresentation = serialize(simpleObject); return deserialize(stringRepresentation); } private  SimpleObjectSerializationUtils(); static String serialize(SimpleObject simpleObject); static SimpleObject deserialize(String simpleObject); static SimpleObject clone(SimpleObject simpleObject); }
SimpleObjectSerializationUtils { public static SimpleObject clone(SimpleObject simpleObject) { String stringRepresentation = serialize(simpleObject); return deserialize(stringRepresentation); } private  SimpleObjectSerializationUtils(); static String serialize(SimpleObject simpleObject); static SimpleObject deserialize(String simpleObject); static SimpleObject clone(SimpleObject simpleObject);  }