@Test
public void testStepsWithXmlAttribute() throws Exception {

    FeatureType complexType = ComplexTestData
            .createExample01MultiValuedComplexProperty(new UniqueNameFeatureTypeFactoryImpl());
    Name name = complexType.getName();
    AttributeDescriptor descriptor = new AttributeDescriptorImpl(complexType, name, 0,
            Integer.MAX_VALUE, true, null);
    QName rootQName = new QName(name.getNamespaceURI(), name.getLocalPart());
    NamespaceSupport namespaces = new NamespaceSupport();
    namespaces.declarePrefix("wq", name.getNamespaceURI());
    namespaces.declarePrefix("xlink", XLINK.NAMESPACE);
    StepList steps = XPathUtil.steps(descriptor, "wq_plus/measurement[2]/@xlink:href", namespaces);
    assertNotNull(steps);
    assertEquals(steps.toString(), 2, steps.size());
    XPathUtil.Step step1 = new XPathUtil.Step(new QName(rootQName.getNamespaceURI(), "measurement"), 2,
            false);
    XPathUtil.Step step2 = new XPathUtil.Step(XLINK.HREF, 1, true);
    assertEquals(step1, steps.get(0));
    assertEquals(step2, steps.get(1));
}