void () { final FeatureDescriptor featureDescriptor = myRegistry.getFeatureDescriptor(TestProductivityFeatureProvider.tipId); Element featureStatistics = new Element("features"); Element element = new Element("feature"); element.setAttribute("id", TestProductivityFeatureProvider.tipId); element.setAttribute("count", "1"); element.setAttribute("last-shown", String.valueOf(System.currentTimeMillis())); element.setAttribute("last-used", String.valueOf(System.currentTimeMillis())); element.setAttribute("average-frequency", "0"); element.setAttribute("shown-count", "1"); featureStatistics.addContent(element); ((FeatureUsageTrackerImpl)myTracker).loadState(featureStatistics); assertEquals(1, featureDescriptor.getUsageCount()); assertEquals(1, featureDescriptor.getShownCount()); }