### Question:
PropertiesSubstitutor extends Substitutor { public void addVariable(String key, String val) { this.putKeyValuePair(key, val); } PropertiesSubstitutor(String propertiesAbsPath); void addVariable(String key, String val); void deriveVariables(); @Override void processFile(File path); String getGlobalProjectPrefix(); String getProjectResourcesDir(); String getTemplateDir(); String getGenerateDir(); String getProjectMidfix(); String getProjectDirectory(); PropertyUtil getPropertyUtils(); String getProjectPackagePath(); String getProp(String string); String getContextProp(String string); ServiceDef getServiceDef(); void setServiceDef(ServiceDef serviceDef);  }### Answer:
@Test public void testAddVariable() { st.addVariable("testvar", "testval"); String val = st.getContextProp("testvar"); assertTrue("Test variable not created successfully.",val.equals("testval")); st.applySubstitution(val); }