### Question:
NodeReqExclScorer extends NodeScorer { @Override public boolean nextCandidateDocument() throws IOException { if (!reqScorer.nextCandidateDocument()) { return false; } if (exclScorer == null) { return true; } return this.toNonExcludedCandidateDocument(); } NodeReqExclScorer(final NodeScorer reqScorer,
                           final NodeScorer exclScorer); @Override boolean nextCandidateDocument(); @Override boolean nextNode(); @Override int doc(); @Override IntsRef node(); @Override float freqInNode(); @Override float scoreInNode(); @Override boolean skipToCandidate(final int target); @Override String toString();  }### Answer:
@Test public void testNextCandidateDocument() throws Exception { this.addDocuments( "\"aaa bbb\" \"aaa ccc\" . \"aaa bbb ccc\" \"bbb ccc\" . ", "\"aaa\" \"aaa bbb\" . " ); final NodeScorer scorer = this.getScorer( nbq(must("aaa"), not("bbb")) ); assertTrue(scorer.nextCandidateDocument()); assertEquals(0, scorer.doc()); assertEquals(node(-1), scorer.node()); assertTrue(scorer.nextNode()); assertEquals(node(0,1), scorer.node()); assertFalse(scorer.nextNode()); assertEquals(DocsAndNodesIterator.NO_MORE_NOD, scorer.node()); assertTrue(scorer.nextCandidateDocument()); assertEquals(1, scorer.doc()); assertEquals(node(-1), scorer.node()); assertTrue(scorer.nextNode()); assertEquals(node(0,0), scorer.node()); assertFalse(scorer.nextNode()); assertEquals(DocsAndNodesIterator.NO_MORE_NOD, scorer.node()); assertEndOfStream(scorer); }