@Test
public void testAdd() throws MimeTypeException {

    try {
        patterns.add(null, text);
        fail("Expected IllegalArgumentException");
    } catch (IllegalArgumentException e) {
        // expected result
    }
    try {
        patterns.add("", null);
        fail("Expected IllegalArgumentException");
    } catch (IllegalArgumentException e) {
        // expected result
    }
    try {
        patterns.add(null, null);
        fail("Expected IllegalArgumentException");
    } catch (IllegalArgumentException e) {
        // expected result
    }
}