create a stream that fails to flush at close time concode_field_sep String TEST_STRING concode_elem_sep File TEST_DIR concode_elem_sep String TEST_STRING_2 concode_elem_sep ExpectedException exception concode_elem_sep File DST_FILE concode_field_sep void testFailToRename concode_elem_sep void cleanupTestDir concode_elem_sep void testWriteNewFile concode_elem_sep void testOverwriteFile concode_elem_sep void testFailToFlush
OutputStream function ( ) { return new AtomicFileOutputStream ( DST_FILE ) { @ Override public void flush ( ) throws IOException { throw new IOException ( "srini_string" ) ; } } ; }