ScopeExtractor implements AttributeExtractor { @Override public void setValue(String key, Object value) { context.setAttribute(key, value, scope); } ScopeExtractor(JspContext context, int scope); @Override void removeValue(String name); @Override Enumeration<String> getKeys(); @Override Object getValue(String key); @Override void setValue(String key, Object value);  }
@Test public void testSetValue() { context.setAttribute("key", "value", PageContext.PAGE_SCOPE); replay(context); extractor.setValue("key", "value"); verify(context); }