### Question:
MmdTool extends BasicTool { static Date getStopTime(Configuration configuration) { return configuration.getDateValue(Configuration.KEY_MMS_MMD_TARGET_STOP_TIME); } MmdTool(); static void main(String[] args); @Override void initialize();  }### Answer:
@Test public void testGetStopTime() { final Configuration configuration = new Configuration(); configuration.put(Configuration.KEY_MMS_MMD_TARGET_STOP_TIME, "1993-03-04T00:00:00Z"); final Date stopTime = MmdTool.getStopTime(configuration); assertNotNull(stopTime); assertCorrectDate(1993, 3, 4, stopTime); }
@Test public void testGetStopTime_throwsWhenValueNotInConfig() { final Configuration configuration = new Configuration(); try { MmdTool.getStopTime(configuration); fail("ToolException expected"); } catch (ToolException expected) { } }