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