@Test public void testBucketBucketFlat() { RevTree left = RevObjectTestSupport.INSTANCE.createFeaturesTree(leftSource, "f", CanonicalNodeNameOrder.normalizedSizeLimit(0) + 1); RevTree right = RevObjectTestSupport.INSTANCE.createFeaturesTree(rightSource, "f", CanonicalNodeNameOrder.normalizedSizeLimit(0) + 2); PreOrderDiffWalk visitor = newVisitor(left, right); when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketBucketFlat() { RevTree left = testSupport.createFeaturesTree(leftSource, "f", CanonicalNodeNameOrder.normalizedSizeLimit(0) + 1); RevTree right = testSupport.createFeaturesTree(rightSource, "f", CanonicalNodeNameOrder.normalizedSizeLimit(0) + 2); PreOrderDiffWalk visitor = newVisitor(left, right); when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketBucketFlat() { RevTree left = createFeaturesTree(leftSource, "f", CanonicalNodeNameOrder.normalizedSizeLimit(0) + 1); RevTree right = createFeaturesTree(rightSource, "f", CanonicalNodeNameOrder.normalizedSizeLimit(0) + 2); PreOrderDiffWalk visitor = newVisitor(left, right); when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketLeafSimple() { final int leftsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = createFeaturesTree(leftSource, "f", leftsize); RevTree right = createFeaturesTree(rightSource, "f", 1); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = left.buckets().size(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(leftsize - 1)).feature(any(NodeRef.class), (NodeRef) isNull()); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketLeafSeveral() { final int leftsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = RevObjectTestSupport.INSTANCE.createFeaturesTree(leftSource, "f", leftsize); RevTree right = RevObjectTestSupport.INSTANCE.createFeaturesTree(rightSource, "f", 1); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = left.bucketsSize(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(leftsize - 1)).feature(any(NodeRef.class), (NodeRef) isNull()); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testLeafBucketSimple() { final int rightsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = testSupport.createFeaturesTree(leftSource, "f", 1); RevTree right = testSupport.createFeaturesTree(rightSource, "f", rightsize); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = right.bucketsSize(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(rightsize - 1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
private void testLeafBucketDeeper(final int leftsize, final RevTree rightRoot, final int overlapCount) { consumer = mock(Consumer.class); when(consumer.feature(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); // right tree has feature nodes "f0" to "f<rightsize-1>" final int rightsize = (int) rightRoot.size(); // the left tree feature node names start at "f<rightsize - 100>", so there's a 100 node // overlap RevTree leftRoot = testSupport.createFeaturesTree(leftSource, "f", leftsize, rightsize - overlapCount, true); PreOrderDiffWalk visitor = newVisitor(leftRoot, rightRoot); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there shall be <overlapCount> calls to feature with both non null args final int totalFeatureNotifications = (rightsize + leftsize) - overlapCount; verify(consumer, times(totalFeatureNotifications)).feature(any(NodeRef.class), any(NodeRef.class)); // there shall be <overlapCount> calls to feature with both non null args verify(consumer, times(overlapCount)).feature((NodeRef) notNull(), (NodeRef) notNull()); final int expectedDeletes = leftsize - overlapCount; final int expectedAdds = rightsize - overlapCount; verify(consumer, times(expectedDeletes)).feature((NodeRef) notNull(), (NodeRef) isNull()); verify(consumer, times(expectedAdds)).feature((NodeRef) isNull(), (NodeRef) notNull()); }
@Test public void testLeafBucketSimple() { final int rightsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = createFeaturesTree(leftSource, "f", 1); RevTree right = createFeaturesTree(rightSource, "f", rightsize); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = right.buckets().size(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(rightsize - 1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketBucketFlatMoreDepth() { RevTree left = RevObjectTestSupport.INSTANCE.createFeaturesTree(leftSource, "f", CanonicalNodeNameOrder.maxBucketsForLevel(0) * CanonicalNodeNameOrder.normalizedSizeLimit(0)); RevTree right = RevObjectTestSupport.INSTANCE.createFeaturesTree(rightSource, "f", CanonicalNodeNameOrder.maxBucketsForLevel(0) * CanonicalNodeNameOrder.normalizedSizeLimit(0) + 1); PreOrderDiffWalk visitor = newVisitor(left, right); when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // consumer.bucket should be called for depth 0 and then 1 verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(1)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(1)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketBucketFlatMoreDepth() { RevTree left = createFeaturesTree(leftSource, "f", CanonicalNodeNameOrder.maxBucketsForLevel(0) * CanonicalNodeNameOrder.normalizedSizeLimit(0)); RevTree right = createFeaturesTree(rightSource, "f", CanonicalNodeNameOrder.maxBucketsForLevel(0) * CanonicalNodeNameOrder.normalizedSizeLimit(0) + 1); PreOrderDiffWalk visitor = newVisitor(left, right); when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // consumer.bucket should be called for depth 0 and then 1 verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(1)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(1)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketLeafSeveral() { final int leftsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = testSupport.createFeaturesTree(leftSource, "f", leftsize); RevTree right = testSupport.createFeaturesTree(rightSource, "f", 1); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = left.bucketsSize(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(leftsize - 1)).feature(any(NodeRef.class), (NodeRef) isNull()); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketBucketFlatMoreDepth() { RevTree left = testSupport.createFeaturesTree(leftSource, "f", CanonicalNodeNameOrder.maxBucketsForLevel(0) * CanonicalNodeNameOrder.normalizedSizeLimit(0)); RevTree right = testSupport.createFeaturesTree(rightSource, "f", CanonicalNodeNameOrder.maxBucketsForLevel(0) * CanonicalNodeNameOrder.normalizedSizeLimit(0) + 1); PreOrderDiffWalk visitor = newVisitor(left, right); when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // consumer.bucket should be called for depth 0 and then 1 verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(1)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(1)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testLeafBucketSimple() { final int rightsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = RevObjectTestSupport.INSTANCE.createFeaturesTree(leftSource, "f", 1); RevTree right = RevObjectTestSupport.INSTANCE.createFeaturesTree(rightSource, "f", rightsize); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = right.bucketsSize(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(rightsize - 1)).feature((NodeRef) isNull(), any(NodeRef.class)); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketLeafSimple() { final int leftsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = testSupport.createFeaturesTree(leftSource, "f", leftsize); RevTree right = testSupport.createFeaturesTree(rightSource, "f", 1); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = left.bucketsSize(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(leftsize - 1)).feature(any(NodeRef.class), (NodeRef) isNull()); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketLeafSeveral() { final int leftsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = createFeaturesTree(leftSource, "f", leftsize); RevTree right = createFeaturesTree(rightSource, "f", 1); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = left.buckets().size(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(leftsize - 1)).feature(any(NodeRef.class), (NodeRef) isNull()); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Test public void testBucketLeafSimple() { final int leftsize = 1 + CanonicalNodeNameOrder.normalizedSizeLimit(0); RevTree left = RevObjectTestSupport.INSTANCE.createFeaturesTree(leftSource, "f", leftsize); RevTree right = RevObjectTestSupport.INSTANCE.createFeaturesTree(rightSource, "f", 1); PreOrderDiffWalk visitor = newVisitor(left, right); // consume all when(consumer.tree(any(NodeRef.class), any(NodeRef.class))).thenReturn(true); when(consumer.bucket(any(NodeRef.class), any(NodeRef.class), any(BucketIndex.class), any(Bucket.class), any(Bucket.class))).thenReturn(true); visitor.walk(consumer); // there's only the root tree verify(consumer, times(1)).tree(any(NodeRef.class), any(NodeRef.class)); // there's only one feature on the right tree, so all right trees features fall on a single // bucket final int leftBucketCount = left.bucketsSize(); final int expectedBucketCalls = leftBucketCount; verify(consumer, times(expectedBucketCalls)).bucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(leftsize - 1)).feature(any(NodeRef.class), (NodeRef) isNull()); verify(consumer, times(expectedBucketCalls)).endBucket(any(NodeRef.class), any(NodeRef.class), argThat(depthMatches(0)), any(Bucket.class), any(Bucket.class)); verify(consumer, times(1)).endTree(any(NodeRef.class), any(NodeRef.class)); verifyNoMoreInteractions(consumer); }
@Override public boolean bucket(NodeRef leftParent, NodeRef rightParent, BucketIndex bucketIndex, Bucket left, Bucket right) { return !isCancelled() && delegate.bucket(leftParent, rightParent, bucketIndex, left, right); } }
@Override public boolean bucket(NodeRef leftParent, NodeRef rightParent, BucketIndex bucketIndex, Bucket left, Bucket right) { return !isCancelled() && delegate.bucket(leftParent, rightParent, bucketIndex, left, right); } }
@Override public boolean bucket(NodeRef leftParent, NodeRef rightParent, BucketIndex bucketIndex, Bucket left, Bucket right) { return delegate.bucket(leftParent, rightParent, bucketIndex, left, right); }
@Override public boolean bucket(NodeRef leftParent, NodeRef rightParent, BucketIndex bucketIndex, Bucket left, Bucket right) { return delegate.bucket(leftParent, rightParent, bucketIndex, left, right); }