HomePage page = tester.startPage(HomePage.class);
// assert rendered page class
tester.assertRenderedPage(HomePage.class);
ISerializer pageSerializer = getAndCheckSerializer();
byte[] data = pageSerializer.serialize(page);
Assert.assertNotNull("The produced data should not be null!", data);
// data length can fluctuate based on the object field values
Assert.assertEquals("The produced data length is not correct!", 651, data.length);
Object object = pageSerializer.deserialize(data);
Assert.assertTrue(
"The deserialized page must be of type HomePage. Type: " + object.getClass(),
object instanceof HomePage);
}