### Question:
MmdTool extends BasicTool { static String getCondition(Configuration config) { return config.getStringValue("mms.target.condition", null); } MmdTool(); static void main(String[] args); @Override void initialize();  }### Answer:
@Test public void testGetCondition() { final Configuration config = new Configuration(); config.put("mms.target.condition", "the_condition"); final String condition = MmdTool.getCondition(config); assertEquals("the_condition", condition); }
@Test public void testGetCondition_returnsNullWhenNotPresentInConfig() { final Configuration config = new Configuration(); final String condition = MmdTool.getCondition(config); assertNull(condition); }