@Test
  public void statesFeatureV110() throws Exception {
    LayerSchemaDTO layerSchema =
        wfsService.describeFeatureType(addressDatastore, TOPP_STATES.getLocalPart());
    logger.info("\n\n\n@@@ {}", layerSchema);

    Assert.assertNotNull(layerSchema);
    Assert.assertEquals(TOPP_STATES.getLocalPart(), layerSchema.getTypeName());
    Assert.assertEquals(TOPP_STATES.getNamespaceURI(), layerSchema.getTargetNamespace());
    Assert.assertEquals(addressDatastore, layerSchema.getScope());

    AttributeDTO geometry = layerSchema.getGeometry();
    Assert.assertNotNull(geometry);
    Assert.assertEquals("the_geom", geometry.getName());
    Assert.assertEquals("MultiPolygon", geometry.getType());

    List<AttributeDTO> attributes = layerSchema.getAttributes();
    Assert.assertNotNull(attributes);
    Assert.assertEquals(22, attributes.size());
    for (AttributeDTO attribute : attributes) {
      Assert.assertNotNull(attribute);
      Assert.assertNotNull(attribute.getName());
      Assert.assertNotNull(attribute.getType());
      Assert.assertTrue(attribute.isNillable());
      Assert.assertEquals(0, attribute.getMinOccurs());
      Assert.assertEquals(1, attribute.getMaxOccurs());
    }
  }
 public static AttributeDetail convert(AttributeDTO attributeDTO) {
   AttributeDetail attribute = new AttributeDetail();
   attribute.setName(attributeDTO.getName());
   attribute.setValue(attributeDTO.getValue() == null ? "" : attributeDTO.getValue());
   attribute.setType(attributeDTO.getType());
   attribute.setMaxOccurs(attributeDTO.getMaxOccurs());
   attribute.setMinOccurs(attributeDTO.getMinOccurs());
   attribute.setNillable(attributeDTO.isNillable());
   return attribute;
 }