HomePage page = tester.startPage(HomePage.class);
// assert rendered page class
tester.assertRenderedPage(HomePage.class);
ISerializer pageSerializer = tester.getApplication().getFrameworkSettings().getSerializer();
Assert.assertTrue(
"The configured IObjectSerializer is not instance of KryoSerializer! Type: " +
pageSerializer.getClass(), pageSerializer instanceof KryoSerializer);
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.assertTrue("The produced data length is not correct!", data.length > 300);
Object object = pageSerializer.deserialize(data);
Assert.assertTrue(
"The deserialized page must be of type HomePage. Type: " + object.getClass(),
object instanceof HomePage);
}