expect(spec.getUserPrefs()).andReturn(specPrefMap).anyTimes();
UserPrefs ctxPrefs = new UserPrefs(inPrefs);
expect(context.getUserPrefs()).andReturn(ctxPrefs).anyTimes();
expect(context.getParameter(Param.REFRESH.getKey())).andReturn(null).anyTimes();
expect(currentView.needsUserPrefSubstitution()).andReturn(needsPrefSubst).anyTimes();
expect(secondView.needsUserPrefSubstitution()).andReturn(!needsPrefSubst).anyTimes();
Map<String, View> views = Maps.newHashMap();
views.put(VIEW, currentView);
views.put(ANOTHER_VIEW, secondView);