    @Test
    public void applyRule_String() throws Exception {

        try {
            OptionsHelper.applyRule(null, null, "string");
            fail("Expected Exception!");
        } catch (Throwable e) {
            assertEquals(OptionsException.class, e.getClass());
        }
        try {
            OptionsHelper.applyRule("notnull", null, "string");
            fail("Expected Exception!");
        } catch (Throwable e) {
            assertEquals(OptionsException.class, e.getClass());
        }

        String optionsField = OptionsHelper.applyRule(null, "d", null);
        assertEquals("", optionsField);

        optionsField = OptionsHelper.applyRule(null, "d", " ");
        assertEquals("", optionsField);

        optionsField = OptionsHelper.applyRule(null, "d", " ");
        assertEquals("", optionsField);

        optionsField = OptionsHelper.applyRule(null, "o", "myClient");
        assertEquals("-omyClient", optionsField);
    }