Code example for DeflaterInputStream

0
    /** 
     * @tests DeflaterInputStream#DeflaterInputStream(InputStream,Deflater,int) 
     */ 
    public void testDeflaterInputStreamInputStreamDeflaterInt() { 
        // ok 
        new DeflaterInputStream(is, new Deflater(), 1024);
        // fail 
        try { 
            new DeflaterInputStream(is, null, 1024);
            fail("should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected 
        } 
        try { 
            new DeflaterInputStream(null, new Deflater(), 1024);
            fail("should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected 
        } 
        try { 
            new DeflaterInputStream(is, new Deflater(), -1);