SingleWriterMultipleReaderFile { public InputStream openRead() throws FileNotFoundException { return new FileInputStream(activeFile); } SingleWriterMultipleReaderFile(File file); InputStream openRead(); FileOutputStream startWrite(); void finishWrite(FileOutputStream stream); void failWrite(FileOutputStream stream);  }
@Test public void testOpenRead() throws Exception { when(reader.openRead()).thenCallRealMethod(); System.err.println("Foo " + reader); }