@Test(expectedExceptions = DescriptorValidationFailedException.class) public void testParseNodeShouldThrowExceptionWhenSubTreeIsTooDeep() { Whitebox.setInternalState(underTest, "maxDepthOfXmlTree", 1); getChildNodes(); given(element.getNodeType()).willReturn(Node.ELEMENT_NODE); given(element.getTagName()).willReturn(TEMPLATE_FORMATTER_SET_INVOKER_TAG, TEMPLATE_FORMATTER_SET_INVOKER_TAG, TEMPLATE_FORMATTER_TAG); mockTemplateFormatterAttributes(); given(xPathEvaluator.getElementByXPath(Mockito.anyString(), Mockito.eq(document))).willReturn(node); given(formatterInitializer.getExternalClassObject("class")).willReturn(templateFormatter); underTest.parseNode(node, document); }
@Override public Set<ResponseFormatterDescriptor> parseNode(final Node node, final Document document) { int depth = 0; return parse(node, document, depth); }
TemplateDescriptorParser implements NodeParser<Set<ResponseFormatterDescriptor>> { @Override public Set<ResponseFormatterDescriptor> parseNode(final Node node, final Document document) { int depth = 0; return parse(node, document, depth); } }
TemplateDescriptorParser implements NodeParser<Set<ResponseFormatterDescriptor>> { @Override public Set<ResponseFormatterDescriptor> parseNode(final Node node, final Document document) { int depth = 0; return parse(node, document, depth); }  }
TemplateDescriptorParser implements NodeParser<Set<ResponseFormatterDescriptor>> { @Override public Set<ResponseFormatterDescriptor> parseNode(final Node node, final Document document) { int depth = 0; return parse(node, document, depth); }  @Override Set<ResponseFormatterDescriptor> parseNode(final Node node, final Document document); }
TemplateDescriptorParser implements NodeParser<Set<ResponseFormatterDescriptor>> { @Override public Set<ResponseFormatterDescriptor> parseNode(final Node node, final Document document) { int depth = 0; return parse(node, document, depth); }  @Override Set<ResponseFormatterDescriptor> parseNode(final Node node, final Document document);  }