@Test
public void testUpdateFile() throws Exception {

	UploadHelper.simulateFileUpload(requestMock, "600x400.png", "image/png");
	fileService.uploadFile();
	assertEquals("png", getFiles().get(0).getFileType());
	UploadHelper.simulateFileUpload(requestMock, "500x300.jpg", "image/jpg");
	fileService.updateFileContent(getFiles().get(0).getId());
	assertEquals(1, getFiles().size());
	File file = getFiles().get(0);
	assertEquals(500, file.getWidth());
	assertEquals(300, file.getHeight());
	assertEquals("jpg", file.getFileType());
}