expect(modulePrefs.getFeatures()).andReturn(featureMap).anyTimes();
// User prefs
Map<String, UserPref> specPrefMap = Maps.newLinkedHashMap();
for (Map.Entry<String, String> specPref : specPrefs.entrySet()) {
UserPref up = createMock(UserPref.class);
expect(up.getName()).andReturn(specPref.getKey()).anyTimes();
expect(up.getDefaultValue()).andReturn(specPref.getValue()).anyTimes();
replay(up);
specPrefMap.put(up.getName(),up);
}
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();