TiffLong extends TiffValue { @Override public void write(ImageOutputStream ios) throws IOException { ios.writeLongs(new long[]{longValue}, 0, 1); } TiffLong(long longValue); long getValue(); @Override int getSizeInBytes(); @Override void write(ImageOutputStream ios);  }
@Test public void testWrite() throws IOException { final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); final MemoryCacheImageOutputStream stream = new MemoryCacheImageOutputStream(byteArrayOutputStream); final TiffLong tiffLong = new TiffLong(23345L); tiffLong.write(stream); stream.close(); assertEquals(8, byteArrayOutputStream.toString().length()); }