@Test public void testTransformSimple() { Map<String, Object> context = new HashMap<String, Object>(); context.put("key", "value"); context.put("key1", "value1"); context.put("key2", "value2"); ContextTransformer transformer = new ContextTransformer("key"); Assert.assertEquals("value", transformer.transform(context)); }
@Override public Object transform(Object o) { return transform(key, o); }
ContextTransformer implements Transformer { @Override public Object transform(Object o) { return transform(key, o); } }
ContextTransformer implements Transformer { @Override public Object transform(Object o) { return transform(key, o); } ContextTransformer(String key); }
ContextTransformer implements Transformer { @Override public Object transform(Object o) { return transform(key, o); } ContextTransformer(String key); String getKey(); @Override Object transform(Object o); @Override int hashCode(); @Override boolean equals(Object obj); }
ContextTransformer implements Transformer { @Override public Object transform(Object o) { return transform(key, o); } ContextTransformer(String key); String getKey(); @Override Object transform(Object o); @Override int hashCode(); @Override boolean equals(Object obj);  }