BufferedWriterManager { public BufferedWriter open(File file) throws IOException { fileWriter = new FileWriter(file); bufferedWriter = new BufferedWriter(fileWriter); return bufferedWriter; } BufferedWriterManager(CloseableUtils closeableUtils); BufferedWriter open(File file); void close();  }
@Test public void openShouldCreateBufferedWriter() throws Exception { givenBufferedWriterManagerIsCreated(); File testFile = testFileManager.getTestFile(); BufferedWriter bufferedWriter = bufferedWriterManager.open(testFile); assertThat(bufferedWriter, is(not(nullValue()))); }