@Test
public void testFileOutputStream() throws IOException {

  File tmp = FileUtil.createTempFile("tmp-", ".tmp");
  FileOutputStream f = new FileOutputStream(tmp);
  f.write("0123456789".getBytes());
  f.close();
  assertEquals(10, tmp.length());
  f = new FileOutputStream(tmp);
  f.write("01234".getBytes());
  f.close();
  assertEquals(5, tmp.length());
}