FileControlImpl implements FileControl { public void setBasePath(String basePath) { this.basePath = basePath; }  @Override void copyFile(String srcFile, String newFile); @Override void deleteFile(String srcFile); @Override void mergeFile(List<String> fileList, String newFile); @Override void renameFile(String srcFile, String newFile); String getBasePath(); void setBasePath(String basePath); void setCheckFileExist(boolean checkFileExist);  }
@Test public void testSetBasePath01() throws Exception { FileControlImpl fileControl = new FileControlImpl(); String basePath = "aaa"; ReflectionTestUtils.setField(fileControl, "basePath", ""); fileControl.setBasePath(basePath); assertEquals(basePath, ReflectionTestUtils.getField(fileControl, "basePath")); }