@Test
  public void testProperPropertyTypeConverter() throws Exception {
    ModelNode description = createDescription(ModelType.PROPERTY);
    TypeConverter converter =
        TypeConverters.createLegacyTypeConverters(true).getConverter(description);

    CompositeType type = assertCast(CompositeType.class, converter.getOpenType());
    Set<String> keys = type.keySet();
    Assert.assertEquals(2, keys.size());
    assertCompositeType(type, "name", String.class.getName(), "The property name");
    assertCompositeType(type, "value", String.class.getName(), "The property value");

    CompositeData data =
        assertCast(CompositeData.class, converter.fromModelNode(new ModelNode().set("one", "uno")));
    Assert.assertEquals(type, data.getCompositeType());
    Assert.assertEquals("one", data.get("name"));
    Assert.assertEquals("uno", data.get("value"));

    data =
        new CompositeDataSupport(type, new String[] {"name", "value"}, new String[] {"two", "dos"});
    ModelNode newNode = converter.toModelNode(data);
    Assert.assertEquals(ModelType.PROPERTY, newNode.getType());
    Assert.assertEquals(new ModelNode().set("two", "dos"), newNode);

    assertToArray(converter, data);
  }
  @Test
  public void testProperPropertyValueTypeExpressionConverter() throws Exception {
    ModelNode description = createDescription(ModelType.PROPERTY, ModelType.INT);
    TypeConverter converter =
        TypeConverters.createLegacyTypeConverters(true).getConverter(description);

    CompositeType type = assertCast(CompositeType.class, converter.getOpenType());
    Set<String> keys = type.keySet();
    Assert.assertEquals(2, keys.size());
    assertCompositeType(type, "name", String.class.getName(), "The property name");
    assertCompositeType(type, "value", Integer.class.getName(), "The property value");

    CompositeData data =
        assertCast(
            CompositeData.class,
            converter.fromModelNode(
                new ModelNode().setExpression("one", "${this.should.not.exist.!!!!!:1}")));
    Assert.assertEquals(type, data.getCompositeType());
    Assert.assertEquals("one", data.get("name"));
    Assert.assertEquals(1, data.get("value"));

    data =
        new CompositeDataSupport(
            type, new String[] {"name", "value"}, new Object[] {"two", Integer.valueOf(2)});
    ModelNode newNode = converter.toModelNode(data);
    Assert.assertEquals(ModelType.PROPERTY, newNode.getType());
    Assert.assertEquals(new ModelNode().set("two", 2), newNode);

    assertToArray(converter, data);
  }
 private TypeConverter getConverter(ModelNode description) {
   return TypeConverters.createLegacyTypeConverters(false).getConverter(description);
 }