@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getSegmentRangesCount() > 0) { hash = (37 * hash) + SEGMENTRANGES_FIELD_NUMBER; hash = (53 * hash) + getSegmentRangesList().hashCode(); } hash = (37 * hash) + DELEGATIONTOKEN_FIELD_NUMBER; hash = (53 * hash) + getDelegationToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
this.controllerService.getCurrentSegments(ModelHelper.createStreamInfo(SCOPE1, STREAM1), result3); final SegmentRanges segmentRanges = result3.get(); Assert.assertEquals(3, segmentRanges.getSegmentRangesCount()); Assert.assertEquals(0, segmentRanges.getSegmentRanges(0).getSegmentId().getSegmentId()); Assert.assertEquals(computeSegmentId(2, 1), segmentRanges.getSegmentRanges(1).getSegmentId().getSegmentId());
@Test public void getCurrentSegmentsTest() { createScopeAndStream(SCOPE1, STREAM1, ScalingPolicy.fixed(2)); ResultObserver<SegmentRanges> result2 = new ResultObserver<>(); this.controllerService.getCurrentSegments(ModelHelper.createStreamInfo(SCOPE1, STREAM1), result2); final SegmentRanges segmentRanges = result2.get(); Assert.assertEquals(2, segmentRanges.getSegmentRangesCount()); }