class MimeTypeToExtensionsUtil {

    public static String getExtension(final String mimeType)
    {
        if (MIME_TYPES_EXTENSIONS.containsKey(mimeType))
        {
            return MIME_TYPES_EXTENSIONS.get(mimeType);
        }
        return mimeType.substring(mimeType.indexOf("/") + 1);
    }

}

class MimeTypeToExtensionsUtilTest {

    @Test
    public void mapApplicationZipToZip()
    {

        String extension = MimeTypeToExtensionsUtil.getExtension("application/zip");
        Assert.assertEquals("zip", extension);
    }

}