@Test
public void testPackageAlias() throws UnsupportedEncodingException {
testSubject.addPackageAlias("axondomain", "org.axonframework.domain");
testSubject.addPackageAlias("axon", "org.axonframework");
SerializedObject<byte[]> serialized = testSubject.serialize(new StubDomainEvent(), byte[].class);
String asString = new String(serialized.getData(), "UTF-8");
assertFalse("Package name found in:" + asString, asString.contains("org.axonframework.domain"));
StubDomainEvent deserialized = (StubDomainEvent) testSubject.deserialize(serialized);
assertEquals(StubDomainEvent.class, deserialized.getClass());
assertTrue(asString.contains("axondomain"));
}