protected void testMimeType( String name,
String... mimeTypes ) throws Exception {
String filePath = "mimetype/" + name;
InputStream inputStream = getClass().getClassLoader().getResourceAsStream(filePath);
String actualMimeType = getDetector().mimeTypeOf(name, new InMemoryTestBinary(inputStream));
if (mimeTypes != null && mimeTypes.length != 0) {
Set<String> acceptableMimeTypes = new HashSet<String>();
for (String mimeType : mimeTypes) {
if (!StringUtil.isBlank(mimeType)) acceptableMimeTypes.add(mimeType);