use of com.quorum.tessera.p2p.recovery.PushBatchRequest in project tessera by ConsenSys.
the class RecoveryResourceTest method pushBatch.
@Test
public void pushBatch() {
PushBatchRequest pushBatchRequest = new PushBatchRequest(Collections.singletonList("SomeData".getBytes()));
Response result = recoveryResource.pushBatch(pushBatchRequest);
assertThat(result.getStatus()).isEqualTo(200);
ArgumentCaptor<com.quorum.tessera.recovery.resend.PushBatchRequest> argCaptor = ArgumentCaptor.forClass(com.quorum.tessera.recovery.resend.PushBatchRequest.class);
verify(resendManager).storeResendBatch(argCaptor.capture());
com.quorum.tessera.recovery.resend.PushBatchRequest capturedRequest = argCaptor.getValue();
assertThat(capturedRequest).isNotNull();
assertThat(capturedRequest.getEncodedPayloads()).containsExactly("SomeData".getBytes());
}
Aggregations