/**
* Test Field onProcess.
*/
public void testOnProcess() {
MockContext context = MockContext.initContext();
MockRequest request = context.getMockRequest();
Field field = new TextField("text");
field.setRequired(true);
assertEquals("", field.getValue());
// Test with valid request parameter
String expectedValue = "textvalue";
request.setParameter("text", expectedValue);
field.onProcess();
// Perform tests
assertEquals(expectedValue, field.getValue());
assertTrue(field.isValid());
// Test with empty request parameter
expectedValue = "";
request.setParameter("text", expectedValue);
field.onProcess();
// Perform tests
assertEquals(expectedValue, field.getValue());