@Test
public void testPopulateActionForm() throws Exception
{
ServletActionContext sac = getActionContext();
FormPopulateSource formPopulateSource = newMock(FormPopulateSource.class);
PopulateActionForm populateActionForm = getPopulateActionForm(formPopulateSource);
ActionMapping actionConfig = newMock(ActionMapping.class);
ActionForm actionForm = newMock(ActionForm.class);
HttpServletRequest request = newMock(HttpServletRequest.class);
expect(sac.getActionForm()).andReturn(actionForm);
expect(sac.getRequest()).andReturn(request);
expect(formPopulateSource.prePopulate(actionForm, request)).andReturn(actionForm);
replayMocks();
populateActionForm.populate(sac, actionConfig, actionForm);
verifyMocks();
}