### Question:
CPrimitive extends CValue { @Override public void replace(String key, String resolvedValue) { value = value.replaceAll("#\\{" + key + "\\}", Matcher.quoteReplacement(resolvedValue)); } CPrimitive(String value); String value(); @Override Set<String> referencedKeys(); @Override void replace(String key, String resolvedValue); @Override String toString(); @Override boolean equals(final Object o); @Override int hashCode();  }### Answer:
@Test public void replace() throws Exception { final String key = "my-key"; final CPrimitive primitive = new CPrimitive("#{" + key + "}"); final String expectedValue = "C:\\temp\\"; primitive.replace(key, expectedValue); assertEquals(expectedValue, primitive.value()); }