@Test
public void testStartWrite_failDelete() throws Exception {

    when(reader.startWrite()).thenCallRealMethod();
    when(workFile.exists()).thenReturn(true);
    when(workFile.delete()).thenReturn(false);
    try {
        reader.startWrite();
        fail("Failure to delete work file not detected");
    } catch (IOException e) {
        // pass
    }
}