use of tech.pegasys.teku.api.schema.Attestation in project teku by ConsenSys.
the class OkHttpValidatorRestApiClientTest method sendSignedAttestation_WhenBadParameters_ThrowsIllegalArgumentException.
@Test
public void sendSignedAttestation_WhenBadParameters_ThrowsIllegalArgumentException() {
final Attestation attestation = schemaObjects.attestation();
final PostDataFailureResponse response = new PostDataFailureResponse(SC_BAD_REQUEST, "Computer said no", List.of(new PostDataFailure(UInt64.ZERO, "Bad")));
mockWebServer.enqueue(new MockResponse().setResponseCode(SC_BAD_REQUEST).setBody(asJson(response)));
assertThat(apiClient.sendSignedAttestations(List.of(attestation))).isPresent().get().usingRecursiveComparison().isEqualTo(response);
}
Aggregations