@@ -0,0 +1,1615 @@
+package de.flux.playground.deckcompare.fileupload;%0A%0Aimport static junit.framework.TestCase.assertTrue;%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertThat;%0A%0Aimport java.io.File;%0Aimport java.util.List;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.TemporaryFolder;%0Aimport org.springframework.ui.ExtendedModelMap;%0A%0Apublic class FileUploadControllerTest %7B%0A%0A    @Rule%0A    public TemporaryFolder folder = new TemporaryFolder();%0A%0A    private FileUploadController controller;%0A    private ExtendedModelMap model;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        controller = new FileUploadController(folder.getRoot().getPath());%0A        model = new ExtendedModelMap();%0A    %7D%0A%0A    @Test%0A    public void getRequestsShouldUseUploadForm() throws Exception %7B%0A        assertEquals(%22uploadForm%22, controller.provideUploadInfo(model));%0A    %7D%0A%0A    @Test%0A    public void shouldListAllFilesInFolder() throws Exception %7B%0A        folder.newFile(%22firstFile%22);%0A        folder.newFile(%22secondFile%22);%0A%0A        controller.provideUploadInfo(model);%0A%0A        assertTrue(%22Model does not contain files%22, model.containsKey(%22files%22));%0A%0A        @SuppressWarnings(%22unchecked%22) // we know that files will be of type List%3CString%3E%0A        final List%3CString%3E files = (List%3CString%3E) model.get(%22files%22);%0A        assertEquals(%22Model has wrong number of files%22, 2, files.size());%0A        assertTrue(%22Model does not contain firstFile%22, files.contains(%22firstFile%22));%0A        assertTrue(%22Model does not contain secondFile%22, files.contains(%22secondFile%22));%0A    %7D%0A%7D

Add test for FileUploadController.provideFileInfo(Model)