InstanceOfExpr extends AbstractExpression { public InstanceOfExpr(final XmlNodeReadOnlyTrx mRtx, final Axis mInputExpr, final SequenceType mSequenceType) { super(mRtx); this.mInputExpr = mInputExpr; this.mSequenceType = mSequenceType; } InstanceOfExpr(final XmlNodeReadOnlyTrx mRtx, final Axis mInputExpr,
      final SequenceType mSequenceType); @Override void reset(final long mNodeKey); @Override void evaluate();  }
@Test(expected = NoSuchElementException.class) public void testInstanceOfExpr() throws SirixException { final AbstractAxis axis1 = new XPathAxis(holder.getXmlNodeReadTrx(), "1 instance of xs:integer"); assertEquals(true, axis1.hasNext()); axis1.next(); assertEquals(holder.getXmlNodeReadTrx().keyForName("xs:boolean"), holder.getXmlNodeReadTrx().getTypeKey()); assertEquals(true, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis1.hasNext()); final AbstractAxis axis2 = new XPathAxis(holder.getXmlNodeReadTrx(), "\"hallo\" instance of xs:integer"); assertEquals(true, axis2.hasNext()); axis2.next(); assertEquals(holder.getXmlNodeReadTrx().keyForName("xs:boolean"), holder.getXmlNodeReadTrx().getTypeKey()); assertEquals(false, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis2.hasNext()); final AbstractAxis axis3 = new XPathAxis(holder.getXmlNodeReadTrx(), "\"hallo\" instance of xs:string ?"); assertEquals(true, axis3.hasNext()); axis3.next(); assertEquals(holder.getXmlNodeReadTrx().keyForName("xs:boolean"), holder.getXmlNodeReadTrx().getTypeKey()); assertEquals(true, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis3.hasNext()); final AbstractAxis axis4 = new XPathAxis(holder.getXmlNodeReadTrx(), "\"hallo\" instance of xs:string +"); assertEquals(true, axis4.hasNext()); axis4.next(); assertEquals(holder.getXmlNodeReadTrx().keyForName("xs:boolean"), holder.getXmlNodeReadTrx().getTypeKey()); assertEquals(true, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis4.hasNext()); final AbstractAxis axis5 = new XPathAxis(holder.getXmlNodeReadTrx(), "\"hallo\" instance of xs:string *"); assertEquals(true, axis5.hasNext()); axis5.next(); assertEquals(holder.getXmlNodeReadTrx().keyForName("xs:boolean"), holder.getXmlNodeReadTrx().getTypeKey()); assertEquals(true, Boolean.parseBoolean(holder.getXmlNodeReadTrx().getValue())); assertEquals(false, axis5.hasNext()); axis5.next(); }