@Test
public void readOnly() throws IOException {

    COSStream existing = spy(new COSStream());
    existing.setItem(COSName.A, COSInteger.THREE);
    victim = ReadOnlyFilteredCOSStream.readOnly(existing);
    assertEquals(COSInteger.THREE, victim.getItem(COSName.A));
    verify(existing).setEncryptor(null);
    verify(existing, never()).getFilteredStream();
    victim.getFilteredStream();
    verify(existing).getFilteredStream();
}