use of tech.pegasys.teku.api.response.v1.validator.GetAttestationDataResponse in project teku by ConsenSys.
the class OkHttpValidatorRestApiClientTest method createAttestationData_WhenSuccessWithNonData_ReturnsAttestationData.
@Test
public void createAttestationData_WhenSuccessWithNonData_ReturnsAttestationData() {
final UInt64 slot = UInt64.ONE;
final int committeeIndex = 1;
final AttestationData expectedAttestationData = schemaObjects.attestation().data;
mockWebServer.enqueue(new MockResponse().setResponseCode(SC_OK).setBody(asJson(new GetAttestationDataResponse(expectedAttestationData))));
Optional<AttestationData> attestationData = apiClient.createAttestationData(slot, committeeIndex);
assertThat(attestationData).isPresent();
assertThat(attestationData.get()).usingRecursiveComparison().isEqualTo(expectedAttestationData);
}
Aggregations