FileWriterCommonsIOImpl implements FileWriter { @Override public FileWriter setWriteTarget(File file) { this.file = file; return this; } FileWriterCommonsIOImpl(File file); @Override FileWriter setEncoding(String encoding); @Override FileWriter setWriteTarget(File file); @Override void writeText(String text); @Override void writeText(String text, String encoding);  }
@Test public void setWriteTarget_A$File() throws Exception { File argFile = null; FileWriterCommonsIOImpl target = new FileWriterCommonsIOImpl(argFile); File file = new File("src/test/resources/tmp.txt"); FileWriter actual = target.setWriteTarget(file); assertNotNull(actual); }