### Question:
DummyVariableCreator extends AbstractDatasetFeatureVectorTransformer implements Serializable { @Deprecated public DummyVariableCreator(Dataset dataset) { this(dataset, false); } @Deprecated  DummyVariableCreator(Dataset dataset); @Deprecated  DummyVariableCreator(Dataset dataset, boolean keepOriginalFeature);  DummyVariableCreator(Dataset dataset, boolean keepOriginalFeature, boolean dense); @Override FeatureInformation getFeatureInformation(FeatureInformation featureInformation); @Override FeatureVector apply(FeatureVector featureVector); FeatureVector convert(FeatureVector featureVector); @Override String toString();  }### Answer:
@SuppressWarnings("deprecation") @Test public void testDummyVariableCreator() { Dataset dataset = makeDataset(); DummyVariableCreator dummyVariableCreator = new DummyVariableCreator(dataset); assertEquals(2, dummyVariableCreator.getNominalFeatureCount()); assertEquals(5, dummyVariableCreator.getCreatedNumericFeatures().size()); FeatureVector instance = new InstanceBuilder().set("f1", "beta").set("f2", false).create(); FeatureVector converted = dummyVariableCreator.convert(instance); assertEquals(5, converted.size()); assertEquals(0, converted.getNumeric("f1:alpha").getInt()); assertEquals(1, converted.getNumeric("f1:beta").getInt()); assertEquals(0, converted.getNumeric("f1:gamma").getInt()); assertEquals(0, converted.getNumeric("f1:delta").getInt()); assertEquals(0, converted.getNumeric("f2:true").getInt()); instance = new InstanceBuilder().set("f1", "beta").set("f2", true).create(); converted = dummyVariableCreator.convert(instance); assertEquals(1., converted.getNumeric("f2:true").getInt(), 0); instance = new InstanceBuilder().set("f1", "beta").set("f2", true).set("f3", false).create(); converted = dummyVariableCreator.convert(instance); assertEquals(6, converted.size()); assertEquals(false, converted.getBoolean("f3").getBoolean()); }