@Test
public void testSerialization() {

	try {
		// without resolved hostname
		{
			TaskManagerLocation original = new TaskManagerLocation(
					ResourceID.generate(), InetAddress.getByName("1.2.3.4"), 8888);
			TaskManagerLocation serCopy = InstantiationUtil.clone(original);
			assertEquals(original, serCopy);
		}
					
		// with resolved hostname
		{
			TaskManagerLocation original = new TaskManagerLocation(
					ResourceID.generate(), InetAddress.getByName("127.0.0.1"), 19871);
			original.getFQDNHostname();
			TaskManagerLocation serCopy = InstantiationUtil.clone(original);
			assertEquals(original, serCopy);
		}
	}
	catch (Exception e) {
		e.printStackTrace();
		fail(e.getMessage());
	}
}