@@ -0,0 +1,1038 @@
+package uk.ac.ebi.quickgo.annotation.download.http;%0A%0Aimport java.nio.charset.StandardCharsets;%0Aimport org.junit.Test;%0Aimport org.springframework.http.MediaType;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static uk.ac.ebi.quickgo.annotation.download.http.MediaTypeFactory.EXCEL_MEDIA_TYPE;%0A%0A/**%0A * Test the functionality in MediaTypeFactory%0A *%0A * @author Tony Wardell%0A * Date: 20/11/2017%0A * Time: 16:34%0A * Created with IntelliJ IDEA.%0A */%0Apublic class MediaTypeFactoryTest %7B%0A%0A    @Test%0A    public void requestedMediaTypeWithoutCharacterSet()%7B%0A        assertThat(MediaTypeFactory.fileExtension(new MediaType(%22text%22,%22tsv%22)), is(%22tsv%22));%0A    %7D%0A%0A    @Test%0A    public void requestedMediaTypeWithUTF8()%7B%0A        assertThat(MediaTypeFactory.fileExtension(new MediaType(%22text%22,%22tsv%22, StandardCharsets.UTF_8)),%0A                is(%22tsv%22));%0A    %7D%0A%0A    @Test%0A    public void requestedMediaTypeIsExcel()%7B%0A        assertThat(MediaTypeFactory.fileExtension(EXCEL_MEDIA_TYPE), is(%22xls%22));%0A    %7D%0A%0A%7D%0A

Test the functionality in MediaTypeFactory