@@ -0,0 +1,1378 @@
+package io.javalin;%0A%0Aimport com.mashape.unirest.http.HttpResponse;%0Aimport com.mashape.unirest.http.Unirest;%0Aimport org.apache.commons.io.FileUtils;%0Aimport org.junit.Test;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport static org.hamcrest.MatcherAssert.*;%0Aimport static org.hamcrest.Matchers.*;%0A%0A/**%0A * Created by enchanting on 10.08.17.%0A */%0Apublic class TestFileUpload extends _UnirestBaseTest %7B%0A%0A    private static final String EXPECTED_CONTENT = %22Expected file content%22;%0A%0A    @Test%0A    public void testFileUpload() throws Exception %7B%0A%0A        app.post(%22/testFileUpload%22, ctx -%3E %7B%0A            File uploadedFile = createTempFile(%22Not expected content ...%22);%0A            FileUtils.copyInputStreamToFile(ctx.uploadedFile(%22upload%22).getContent(), uploadedFile);%0A            ctx.result(FileUtils.readFileToString(uploadedFile));%0A        %7D);%0A%0A        HttpResponse%3CString%3E response = Unirest.post(%22http://localhost:7777/testFileUpload%22)%0A                .field(%22upload%22, createTempFile(EXPECTED_CONTENT))%0A                .asString();%0A%0A        assertThat(response.getBody(), is(EXPECTED_CONTENT));%0A%0A        app.stop();%0A    %7D%0A%0A    private File createTempFile(String content) throws IOException %7B%0A        File file = File.createTempFile(%22javalin-testfile-%22, %22.tmp%22);%0A        FileUtils.writeStringToFile(file, content);%0A        file.deleteOnExit();%0A        return file;%0A    %7D%0A%0A%7D%0A

Add file-upload test (fixes #34)