AbstractNode implements Node { @Override @SuppressWarnings("unchecked") public List<Node> findChildNodesWithXPath(final String xpathString) throws JaxenException { return new BaseXPath(xpathString, new ContextualizedNavigator(DeprecatedAttrLogger.createAdHocLogger())) .selectNodes(this); } AbstractNode(final int id);  AbstractNode(final int id, final int theBeginLine, final int theEndLine, final int theBeginColumn,
                        final int theEndColumn); @Override Node getParent(); @Override int getIndexInParent(); @Override Node getChild(final int index); @Override int getNumChildren(); @Deprecated boolean isSingleLine(); @Override @Deprecated @InternalApi void jjtOpen(); @Override @Deprecated @InternalApi void jjtClose(); @Override @Deprecated @InternalApi void jjtSetParent(final Node parent); @Override @Deprecated Node jjtGetParent(); @Override @Deprecated @InternalApi void jjtAddChild(final Node child, final int index); @Override @Deprecated @InternalApi void jjtSetChildIndex(final int index); @Override @Deprecated int jjtGetChildIndex(); @Override @Deprecated Node jjtGetChild(final int index); @Override @Deprecated int jjtGetNumChildren(); @Override @Deprecated int jjtGetId(); @Override String getImage(); @Override @Deprecated void setImage(final String image); @Override boolean hasImageEqualTo(final String image); @Override int getBeginLine(); @Deprecated @InternalApi void testingOnlySetBeginLine(int i); @Override int getBeginColumn(); @Deprecated @InternalApi void testingOnlySetBeginColumn(final int i); @Override int getEndLine(); @Deprecated @InternalApi void testingOnlySetEndLine(final int i); @Override int getEndColumn(); @Deprecated @InternalApi void testingOnlySetEndColumn(final int i); @Override DataFlowNode getDataFlowNode(); @Override void setDataFlowNode(final DataFlowNode dataFlowNode); @Override Node getNthParent(final int n); @Override T getFirstParentOfType(final Class<T> parentType); @Override List<T> getParentsOfType(final Class<T> parentType); @SafeVarargs @Override @Deprecated final T getFirstParentOfAnyType(final Class<? extends T>... parentTypes); @Override List<T> findDescendantsOfType(final Class<? extends T> targetType); @Override List<T> findDescendantsOfType(final Class<T> targetType, final boolean crossBoundaries); @Deprecated @Override void findDescendantsOfType(final Class<T> targetType, final List<T> results,
                                          final boolean crossBoundaries); @Override List<T> findChildrenOfType(final Class<T> targetType); @Override boolean isFindBoundary(); @Override @Deprecated Document getAsDocument(); @Override T getFirstDescendantOfType(final Class<T> descendantType); @Override T getFirstChildOfType(final Class<T> childType); @Override final boolean hasDescendantOfType(final Class<T> type); @Deprecated final boolean hasDecendantOfAnyType(final Class<?>... types); @Deprecated final boolean hasDescendantOfAnyType(final Class<?>... types); @Override @SuppressWarnings("unchecked") List<Node> findChildNodesWithXPath(final String xpathString); @Override boolean hasDescendantMatchingXPath(final String xpathString); @Override @Deprecated Object getUserData(); @Override @Deprecated void setUserData(final Object userData); @Override DataMap<DataKey<?, ?>> getUserMap(); @Deprecated GenericToken jjtGetFirstToken(); @Deprecated void jjtSetFirstToken(final GenericToken token); @Deprecated GenericToken jjtGetLastToken(); @Deprecated void jjtSetLastToken(final GenericToken token); @Override Iterable<? extends Node> children(); @Deprecated @InternalApi @Override void remove(); @Deprecated @InternalApi @Override void removeChildAtIndex(final int childIndex); @Override // @Deprecated // FUTURE 7.0.0 make abstract String getXPathNodeName(); @Deprecated @Override String toString(); @Override Iterator<Attribute> getXPathAttributesIterator();  }
@Test public void testDeprecatedAttributeXPathQuery() throws JaxenException { class MyRootNode extends DummyNode implements RootNode { private MyRootNode(int id) { super(id); } } Node root = addChild(new MyRootNode(nextId()), new DummyNodeWithDeprecatedAttribute(2)); root.findChildNodesWithXPath(" String log = loggingRule.getLog(); assertTrue(log.contains("deprecated")); assertTrue(log.contains("attribute")); assertTrue(log.contains("dummyNode/@Size")); }