Code example for UnsupportedCallbackException

Methods: getMessagegetCallback

0
     * javax.security.auth.callback.UnsupportedCallbackExceptionTest#getCallback() 
     * Assertion: constructs with null parameter. 
     */ 
    public void testUnsupportedCallbackException01() { 
        Callback c = null;
        UnsupportedCallbackException ucE = new UnsupportedCallbackException(c);
        assertNull("getMessage() must return null.", ucE.getMessage());
        assertNull("getCallback() must return null", ucE.getCallback());
    } 
 
    /** 
     * javax.security.auth.callback.UnsupportedCallbackExceptionTest#UnsupportedCallbackException(Callback callback) 
     * javax.security.auth.callback.UnsupportedCallbackExceptionTest#getCallback() 
     * Assertion: constructs with not null parameter. 
     */ 
    public void testUnsupportedCallbackException02() { 
        myCallback c = new myCallback();
        assertNotNull("Callback object is null", c);
        UnsupportedCallbackException ucE = new UnsupportedCallbackException(c);
        assertNull("getMessage() must return null.", ucE.getMessage());
Connect your IDE to all the code out there  Get Codota for Java