FeatureRecord { private void prepare() { prepareDefault(); prepareNamespaces(); } private  FeatureRecord(Feature feature); Feature feature(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }
@Test public void testPrepare() { final Feature feature = TestSupport.loadFeature("json/feature-1.json"); FeatureRecord record = FeatureRecord.build(feature); assertEquals(feature, record.feature()); final FeatureOption controlFeatureOption = record.controlFeatureOption(); assertNotNull(controlFeatureOption); assertEquals("option-green", controlFeatureOption.getKey()); assertEquals("green", controlFeatureOption.getValue()); assertEquals(3000, controlFeatureOption.getWeight()); final NamespaceFeature staging = record.namespace("staging"); assertNotNull(staging); final FeatureOption stagingControlOptionRecord = record.controlFeatureOption("staging"); assertNotNull(stagingControlOptionRecord); FeatureOption stagingControlOptionData = null; final String control = staging.getFeature().getOptions().getControl(); for (FeatureOption featureOption : staging.getFeature().getOptions().getItemsList()) { if (featureOption.getKey().equals(control)) { stagingControlOptionData = featureOption; break; } } assertEquals(stagingControlOptionData, stagingControlOptionRecord); assertNotNull(record.optionSelectorWeighted()); assertNotNull(record.optionSelectorWeighted("staging")); }