public static DispositionNotificationOptions parseDispositionNotificationOptions(
            final String value,
            DispositionNotificationOptionsParser parser)
            throws ParseException {
        if (value == null) {
            return new DispositionNotificationOptions(null, null);
        }

        final CharArrayBuffer buffer = new CharArrayBuffer(value.length());
        buffer.append(value);
        final ParserCursor cursor = new ParserCursor(0, value.length());
        return (parser != null ? parser : DispositionNotificationOptionsParser.INSTANCE)
                .parseDispositionNotificationOptions(buffer, cursor);
    }
@Test
    public void parseDispositionNotificationOptionsTest() throws ParseException {

        DispositionNotificationOptions dispositionNotificationOptions
                = DispositionNotificationOptionsParser.parseDispositionNotificationOptions(TEST_NAME_VALUES, null);
        Parameter signedReceiptProtocol = dispositionNotificationOptions.getSignedReceiptProtocol();
        assertNotNull(signedReceiptProtocol, "signed receipt protocol not parsed");
        assertEquals(SIGNED_RECEIPT_PROTOCOL_ATTRIBUTE, signedReceiptProtocol.getAttribute(),
                "Unexpected value for signed receipt protocol attribute");
        assertEquals(SIGNED_RECEIPT_PROTOCOL_IMPORTANCE, signedReceiptProtocol.getImportance().getImportance(),
                "Unexpected value for signed receipt protocol importance");
        assertArrayEquals(SIGNED_RECEIPT_PROTOCOL_VALUES, signedReceiptProtocol.getValues(),
                "Unexpected value for parameter importance");

        Parameter signedReceiptMicalg = dispositionNotificationOptions.getSignedReceiptMicalg();
        assertNotNull(signedReceiptProtocol, "signed receipt micalg not parsed");
        assertEquals(SIGNED_RECEIPT_MICALG_ATTRIBUTE, signedReceiptMicalg.getAttribute(),
                "Unexpected value for signed receipt micalg attribute");
        assertEquals(SIGNED_RECEIPT_MICALG_IMPORTANCE, signedReceiptMicalg.getImportance().getImportance(),
                "Unexpected value for signed receipt micalg importance");
        assertArrayEquals(SIGNED_RECEIPT_MICALG_VALUES, signedReceiptMicalg.getValues(),
                "Unexpected value for micalg importance");
    }