@Test
public void testSerialization() throws Exception {
// Create instrumented instance:
byte[] bytes = instrumenter.instrument(
TargetLoader.getClassData(SerializationTarget.class), "Test");
TargetLoader loader = new TargetLoader();
Object obj1 = loader.add(SerializationTarget.class, bytes)
.getConstructor(String.class, Integer.TYPE)
.newInstance("Hello", Integer.valueOf(42));
// Serialize instrumented instance:
ByteArrayOutputStream buffer = new ByteArrayOutputStream();