@Test
public void samplepageRendersSuccessfully()
{
// start and render the test page
SamplePage page = tester.startPage(SamplePage.class,
new PageParameters().add("Test", "asString"));
// assert rendered page class
tester.assertRenderedPage(SamplePage.class);
ISerializer pageSerializer = getAndCheckSerializer();
byte[] data = pageSerializer.serialize(page);
Assert.assertNotNull("The produced data should not be null!", data);
Object object = pageSerializer.deserialize(data);
Assert.assertTrue(
"The deserialized page must be of type HomePage. Type: " + object.getClass(),
object instanceof SamplePage);
SamplePage samplePage = (SamplePage)object;
tester.startPage(samplePage);
// assert rendered page class
tester.assertRenderedPage(SamplePage.class);