@Test
public void testRenderTemplateFileSubstitutesPropertiesWithDotsFromContext() throws IOException {

    TemplateRenderer trWithCustomProperties = mkTemplateRendererWithPropertiesMap(new HashMap<>());
    File file = writeTemplateFromString(wrapTemplateXml(addPropertiesToTemplate(exampleDotTemplate, new HashMap<>())));
    HashMap<String, Object> contextMap = new HashMap<>();
    // In order to resolve ${property.subproperty}, velocity searches the context for an object called "property" with
    // a field "subproperty". The value of "subproperty" will then replace ${property.subproperty}.
    // This can be arbitrarily nested.
    contextMap.put("property", new Property());
    String result = trWithCustomProperties.renderTemplateFile(file, contextMap);
    assertThat(result).doesNotContain("$" + propertyWithDotKey);
    assertThat(result).doesNotContain("${" + propertyWithDotKey + "}");
    assertThat(result).doesNotContain("$" + propertyWithDotKey);
    assertThat(result).contains("<test" + propertyWithDotValue + ">" + propertyWithDotValue + "</test" + propertyWithDotValue + ">");
}