PageData { public byte[] getData() { return ArrayUtils.clone(data); } PageData(byte[] data, String contentType); byte[] getData(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void getData() { byte[] data = { 1, 2, 3 }; PageData pageData = new PageData(data, "image/png"); assertTrue(Arrays.equals(data, pageData.getData())); }