VelocityScopeMap extends ScopeMap { public int size() { return request.getKeys().length; } VelocityScopeMap(Context request); @Override Object remove(Object key); @Override Object put(String key, Object value); boolean containsKey(Object key); boolean isEmpty(); Set<String> keySet(); int size();  }
@Test public void testSize() { expect(request.getKeys()).andReturn(new Object[] {"one", "two"}); replay(request); assertEquals(2, map.size()); verify(request); }