assertTrue("Wrong filename: " + uploaded, uploaded.matches("spam.foo.*\\.properties$"));
}
@Test
public void testEmptyUpload() throws Exception {
MockMultipartFile file = new MockMultipartFile("foo", "foo.properties", "text/plain", "".getBytes());
ExtendedModelMap model = new ExtendedModelMap();
Date date = new Date();
BindException errors = new BindException(date, "date");
controller.upload("spam", file, model, 0, 20, date, errors);
assertTrue(errors.hasErrors());