Code example for ClosedChannelException

Methods: getCause, getLocalizedMessage, getMessage

0
     
    /** 
     * @tests {@link java.nio.channels.ClosedChannelException#ClosedChannelException()} 
     */ 
    public void test_Constructor() { 
        ClosedChannelException e = new ClosedChannelException();
        assertNull(e.getMessage());
        assertNull(e.getLocalizedMessage());
        assertNull(e.getCause());
    } 
 
    /** 
     * @tests serialization/deserialization compatibility. 
     */ 
    @TestTargets({ 
        @TestTargetNew( 
            level = TestLevel.COMPLETE, 
            notes = "Verifies serialization/deserialization compatibility.", 
            method = "!SerializationSelf", 
            args = {} 
        ),