Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/tests/javax/activation/MimetypesFileTypeMapTest.java
package tests.javax.activation;

import static org.junit.Assert.*;

import org.junit.Test;

import java.io.IOException;

import javax.activation.FileTypeMap;
import javax.activation.MimetypesFileTypeMap;

public class MimetypesFileTypeMapTest {

    @Test
    public void test() throws IOException {
        @SuppressWarnings("unused")
        MimetypesFileTypeMap map = new MimetypesFileTypeMap(getClass().getResourceAsStream("/META-INF/mimetypes.default"));
        FileTypeMap def = MimetypesFileTypeMap.getDefaultFileTypeMap();
        assertEquals("image/png", def.getContentType("asd.png"));
        assertEquals("image/jpeg", def.getContentType("asd.jpg"));
        assertEquals("image/jpeg", def.getContentType("asd.jpeg"));
        assertEquals("image/jpeg", def.getContentType("asd.JPG"));
        //assertEquals("application/octet-stream", def.getContentType("asd.css"));
    }
}
-------------------------------------------------------------------------------
Test set: tests.javax.activation.MimetypesFileTypeMapTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 s - in tests.javax.activation.MimetypesFileTypeMapTest
test  Time elapsed: 0.017 s