Task { public String getCommandText() { if (getProperties().containsKey("commandText")) { return getProperties().get("commandText"); } else { return ""; } }  String getName(); void setName(String name); String getComment(); void setComment(String comment); final Map<String, String> getProperties(); final void setProperties(Map<String, String> properties); void setProperty(String name, String value); String getCommandText();  }
@Test public void testGetCommandText() { SQLTask task = new SQLTask(); task.setName("name"); task.setQuery("select count(*) from src;"); assertEquals(task.getCommandText(), "select count(*) from src;"); }