### Question:
MmdTool extends BasicTool { static NetcdfFileWriter createNetcdfFileWriter(Configuration config) throws IOException { final String mmdDirPath = config.getStringValue(Configuration.KEY_MMS_MMD_TARGET_DIR, "."); final String mmdFileName = config.getStringValue(Configuration.KEY_MMS_MMD_TARGET_FILENAME); final File mmdFile = new File(mmdDirPath, mmdFileName); if (mmdFile.exists()) { if (!mmdFile.delete()) { throw new IOException("unable to delete file: " + mmdFile.getAbsolutePath()); } } return NetcdfFileWriter.createNew(Version.netcdf3, mmdFile.getPath()); } MmdTool(); static void main(String[] args); @Override void initialize();  }### Answer:
@Test public void testCreateNetCDFWriter() throws IOException { final Configuration configuration = new Configuration(); configuration.put(Configuration.KEY_MMS_MMD_TARGET_DIR, "here/we"); configuration.put(Configuration.KEY_MMS_MMD_TARGET_FILENAME, "are_now.nc"); final NetcdfFileWriter netCDFWriter = MmdTool.createNetcdfFileWriter(configuration); assertNotNull(netCDFWriter); }
@Test public void testCreateNetCDFWriter_withConfigurationDefaultValues() throws IOException { final Configuration configuration = new Configuration(); configuration.put("mms.target.filename", "mmd.nc"); final NetcdfFileWriter netCDFWriter = MmdTool.createNetcdfFileWriter(configuration); assertNotNull(netCDFWriter); }