Code example for Adler32

Methods: getValue, reset, update

0
                1, adl.getValue());
 
        adl.reset();
        adl.update(1);
        // System.out.print("value of adl"+adl.getValue()); 
        // The value of the adl should be 131074 
        assertEquals(
                "update(int) failed to update the checksum to the correct value ", 
                131074, adl.getValue());
        adl.reset();
        assertEquals("reset failed to reset the checksum value to zero", 1, adl
                .getValue());
 
        adl.reset();
        adl.update(Integer.MIN_VALUE);
        // System.out.print("value of adl " + adl.getValue()); 
        // The value of the adl should be 65537 
        assertEquals(
                "update(min) failed to update the checksum to the correct value ", 
                65537L, adl.getValue());
    }