### Question:
Decorator implements Mapper { public static <T> Builder<T> decorate(T delegate) { return new Builder<T>(delegate); } private  Decorator(T delegate, Map<String, Function<T, Object>> mappings, String delegateKey,
            Configuration configuration); static Builder<T> decorate(T delegate); static Decorator<T> decorate(T delegate, Map<String, Function<T, Object>> mappings, String delegateKey,
            Configuration configuration); @SuppressWarnings("unchecked") static T unwrap(T instance); @Override Object get(String key); @Override String toString(); static final String KEY_GET_DELEGATE; }### Answer:
@Test public void testGetDelegate() { Hammer hammer = new Hammer(); assertEquals("EDGAR vs Edgar", engine.compileMustache("{{name}} vs {{delegate.name}}") .render(decorate(hammer).compute("name", h -> h.getName().toUpperCase()).build(engine))); assertEquals("EDGAR vs Edgar", engine.compileMustache("{{name}} vs {{foo.name}}").render( decorate(hammer).delegateKey("foo").compute("name", h -> h.getName().toUpperCase()).build(engine))); }
@Test public void testNestedDecorator() { Hammer hammer = new Hammer(5); assertEquals("5:Edgar:bar", engine.compileMustache("{{age}}:{{foo}}:{{bar}}") .render(decorate(decorate(hammer).compute("foo", h -> h.getName()).build(engine)) .put("bar", "bar").build(engine))); }