@Test
public void testSerialization() {

	try {
		// without resolved hostname
		{
			InstanceConnectionInfo original = new InstanceConnectionInfo(InetAddress.getByName("1.2.3.4"), 8888);
			
			InstanceConnectionInfo copy = CommonTestUtils.createCopyWritable(original);
			assertEquals(original, copy);
			
			InstanceConnectionInfo serCopy = CommonTestUtils.createCopySerializable(original);
			assertEquals(original, serCopy);
		}
					
		// with resolved hostname
		{
			InstanceConnectionInfo original = new InstanceConnectionInfo(InetAddress.getByName("127.0.0.1"), 19871);
			original.getFQDNHostname();
			
			InstanceConnectionInfo copy = CommonTestUtils.createCopyWritable(original);
			assertEquals(original, copy);
			
			InstanceConnectionInfo serCopy = CommonTestUtils.createCopySerializable(original);
			assertEquals(original, serCopy);
		}
	}
	catch (Exception e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}