public void setContents(String contents) {
        this.contents = replaceOptionals(contents);
    }
@Test
    public void testSetContents() {
        RuleTemplate rt = new RuleTemplate("rt1", getTemplateContainer());
        rt.setContents("Test template");
        assertThat(rt.getContents()).isEqualTo("Test template\n");
    }