use of com.quorum.tessera.enclave.EncodedPayload in project tessera by ConsenSys.
the class ResendIndividualIT method resendTransactionWhereKeyIsSender.
@Test
public void resendTransactionWhereKeyIsSender() {
final ResendRequest request = new ResendRequest();
request.setType(RESEND_INDIVIDUAL_VALUE);
request.setKey(this.hash);
request.setPublicKey(sender.getPublicKey());
final Response response = vanillaHttpOnlyClient.target(recipient.getP2PUri()).path(RESEND_PATH).request().post(Entity.entity(request, MediaType.APPLICATION_JSON_TYPE));
assertThat(response).isNotNull();
assertThat(response.getStatus()).isEqualTo(200);
final byte[] returnValue = response.readEntity(byte[].class);
final EncodedPayload payload = ENCODER.decode(returnValue);
assertThat(payload).isNotNull();
assertThat(payload.getRecipientKeys().get(0).encodeToBase64()).isEqualTo(recipient.getPublicKey());
assertThat(payload.getSenderKey().encodeToBase64()).isEqualTo(sender.getPublicKey());
}
Aggregations