HiddenField hiddenField = new HiddenField("timestamp", Timestamp.class);
form.add(hiddenField);
hiddenField.bindRequestValue();
User user = new User();
form.copyTo(user, true);
assertEquals(hiddenField.getValueObject(), user.getTimestamp());
// set up the form for copyFrom
form = new Form("sample");
hiddenField = new HiddenField("timestamp", Timestamp.class);
form.add(hiddenField);
user = new User();
user.setTimestamp(new Timestamp(new Date().getTime()));
form.copyFrom(user);
assertEquals(user.getTimestamp(), hiddenField.getValueObject());
}