### Question:
MmdTool extends BasicTool { static Date getStartTime(Configuration configuration) { return configuration.getDateValue(Configuration.KEY_MMS_MMD_TARGET_START_TIME); } MmdTool(); static void main(String[] args); @Override void initialize();  }### Answer:
@Test public void testGetStartTime() { final Configuration configuration = new Configuration(); configuration.put(Configuration.KEY_MMS_MMD_TARGET_START_TIME, "1992-02-03T00:00:00Z"); final Date startTime = MmdTool.getStartTime(configuration); assertNotNull(startTime); assertCorrectDate(1992, 2, 3, startTime); }
@Test public void testGetStartTime_throwsWhenValueNotInConfig() { final Configuration configuration = new Configuration(); try { MmdTool.getStartTime(configuration); fail("ToolException expected"); } catch (ToolException expected) { } }