Code example for PipedReader

0
     */ 
    public void test_Constructor_LPipedWriter_I() throws Exception { 
        // Test for method java.io.PipedReader(java.io.PipedWriter, 
        // int) 
        try { 
            preader = new PipedReader(null, -1);
            fail("Should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // expected 
        } 
 
        try { 
            preader = new PipedReader(null, 0);
            fail("Should throw IllegalArgumentException");
        } catch (IllegalArgumentException e) {
            // expected 
        } 
    } 
 
    /** 
     * @tests java.io.PipedReader#PipedReader(int)