@Test
public void testSerializeAndBack() throws IOException, ClassNotFoundException {

	ScaleInfo info = new ScaleInfo(1, 100);
	Assert.assertEquals(37.7952, info.getPixelPerUnit(), 0.0001);
	ScaleInfo copy = new ScaleInfo(info);
	Assert.assertEquals(37.7952, copy.getPixelPerUnit(), 0.0001);
	ByteArrayOutputStream baos = new ByteArrayOutputStream();
	JBossObjectOutputStream out = new JBossObjectOutputStream(baos);
	out.writeObject(info);
	out.flush();
	out.close();
	JBossObjectInputStream in = new JBossObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
	ScaleInfo clone = (ScaleInfo) in.readObject();
	Assert.assertNotSame(info, clone);
	Assert.assertEquals(37.7952, clone.getPixelPerUnit(), 0.0001);
}