diff --git a/networking/eth2/src/test/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BlobsSidecarsByRangeMessageHandlerTest.java b/networking/eth2/src/test/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BlobsSidecarsByRangeMessageHandlerTest.java index f1d1c6af80f..d3512e2ef5d 100644 --- a/networking/eth2/src/test/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BlobsSidecarsByRangeMessageHandlerTest.java +++ b/networking/eth2/src/test/java/tech/pegasys/teku/networking/eth2/rpc/beaconchain/methods/BlobsSidecarsByRangeMessageHandlerTest.java @@ -106,13 +106,15 @@ public void shouldNotSendBlobsSidecarsIfPeerIsRateLimited() { @Test public void shouldSendToPeerRequestedNumberOfBlobsSidecars() { - final UInt64 count = UInt64.valueOf(5); final Bytes32 headBlockRoot = dataStructureUtil.randomBytes32(); + when(peer.wantToMakeRequest()).thenReturn(true); + when(peer.wantToReceiveBlobsSidecars(listener, 5)).thenReturn(true); when(combinedChainDataClient.getBestBlockRoot()).thenReturn(Optional.of(headBlockRoot)); when(listener.respond(any())).thenReturn(SafeFuture.COMPLETE); + final UInt64 count = UInt64.valueOf(5); final BlobsSidecarsByRangeRequestMessage request = new BlobsSidecarsByRangeRequestMessage(ZERO, count);