newAccountController = new NewAccountController(newAccountService, newAccountValidator, captchaService);
}
@Test
public void setUpForm_ShouldAddAttributeForUser() {
final ModelMap model = new ModelMap();
String User = ModelKeys.NEW_USER;
newAccountController.setUpForm(model, request);
//assert that the model is not null
assertThat(model, CoreMatchers.notNullValue());
//assert that the model size is two
assertThat(model.size(), CoreMatchers.equalTo(2));
//assert that the model does contain an attribute associated with User after setUpForm() is called
assertThat(model.containsAttribute(User), CoreMatchers.equalTo(true));
//assert that the model does not contain new user as null
assertThat(model.get(User), CoreMatchers.notNullValue());
}