/** * Test method for {@link * net.hyperadapt.pxweave.interpreter.test.OperationInterpreter#interpreteChooseVariant(org.w3c.dom.NodeList)} * . * * @throws XMLWeaverException */ @Test public void testInterpreteChooseVariant() throws XMLWeaverException { final NodeList joinPoints = xPathEvaluator.evaluateXPath("//books:book[1]", document); oInterpreter.interpreteChooseVariant(joinPoints); assertTrue( "only one variant should be left", xPathEvaluator.evaluateXPath("//books:book", document).getLength() == 1); assertTrue( "the variant left should be the right one", (xPathEvaluator .evaluateXPath("//books:book/books:author/books:name", document) .item(0) .getTextContent() .contentEquals("Sam"))); }