@Test public void sendSignedBlock_WhenServiceUnavailable_DoesNotFailHandlingResponse() { final SignedBeaconBlock signedBeaconBlock = schemaObjects.signedBeaconBlock(); mockWebServer.enqueue(new MockResponse().setResponseCode(503)); apiClient.sendSignedBlock(signedBeaconBlock); }
@Override public void sendSignedBlock(final SignedBeaconBlock beaconBlock) { post(SEND_SIGNED_BLOCK, beaconBlock, null); }
OkHttpValidatorRestApiClient implements ValidatorRestApiClient { @Override public void sendSignedBlock(final SignedBeaconBlock beaconBlock) { post(SEND_SIGNED_BLOCK, beaconBlock, null); } }
OkHttpValidatorRestApiClient implements ValidatorRestApiClient { @Override public void sendSignedBlock(final SignedBeaconBlock beaconBlock) { post(SEND_SIGNED_BLOCK, beaconBlock, null); } OkHttpValidatorRestApiClient(final String baseEndpoint); @VisibleForTesting  OkHttpValidatorRestApiClient(final HttpUrl baseEndpoint, final OkHttpClient okHttpClient); }
OkHttpValidatorRestApiClient implements ValidatorRestApiClient { @Override public void sendSignedBlock(final SignedBeaconBlock beaconBlock) { post(SEND_SIGNED_BLOCK, beaconBlock, null); } OkHttpValidatorRestApiClient(final String baseEndpoint); @VisibleForTesting  OkHttpValidatorRestApiClient(final HttpUrl baseEndpoint, final OkHttpClient okHttpClient); @Override Optional<GetForkResponse> getFork(); @Override Optional<GetGenesisResponse> getGenesis(); @Override @SuppressWarnings("unchecked") List<ValidatorDuties> getDuties(final ValidatorDutiesRequest request); @Override List<AttesterDuty> getAttestationDuties(
      final UInt64 epoch, final Collection<Integer> validatorIndexes); @Override List<ProposerDuty> getProposerDuties(final UInt64 epoch); @Override Optional<BeaconBlock> createUnsignedBlock(
      final UInt64 slot, final BLSSignature randaoReveal, final Optional<Bytes32> graffiti); @Override void sendSignedBlock(final SignedBeaconBlock beaconBlock); @Override Optional<Attestation> createUnsignedAttestation(
      final UInt64 slot, final int committeeIndex); @Override void sendSignedAttestation(final Attestation attestation); @Override Optional<Attestation> createAggregate(final Bytes32 attestationHashTreeRoot); @Override void sendAggregateAndProof(final SignedAggregateAndProof signedAggregateAndProof); @Override void subscribeToBeaconCommitteeForAggregation(
      final int committeeIndex, final UInt64 aggregationSlot); @Override void subscribeToPersistentSubnets(final Set<SubnetSubscription> subnetSubscriptions); Optional<T> get(
      final ValidatorApiMethod apiMethod,
      final Map<String, String> queryParams,
      final Class<T> responseClass); }
OkHttpValidatorRestApiClient implements ValidatorRestApiClient { @Override public void sendSignedBlock(final SignedBeaconBlock beaconBlock) { post(SEND_SIGNED_BLOCK, beaconBlock, null); } OkHttpValidatorRestApiClient(final String baseEndpoint); @VisibleForTesting  OkHttpValidatorRestApiClient(final HttpUrl baseEndpoint, final OkHttpClient okHttpClient); @Override Optional<GetForkResponse> getFork(); @Override Optional<GetGenesisResponse> getGenesis(); @Override @SuppressWarnings("unchecked") List<ValidatorDuties> getDuties(final ValidatorDutiesRequest request); @Override List<AttesterDuty> getAttestationDuties(
      final UInt64 epoch, final Collection<Integer> validatorIndexes); @Override List<ProposerDuty> getProposerDuties(final UInt64 epoch); @Override Optional<BeaconBlock> createUnsignedBlock(
      final UInt64 slot, final BLSSignature randaoReveal, final Optional<Bytes32> graffiti); @Override void sendSignedBlock(final SignedBeaconBlock beaconBlock); @Override Optional<Attestation> createUnsignedAttestation(
      final UInt64 slot, final int committeeIndex); @Override void sendSignedAttestation(final Attestation attestation); @Override Optional<Attestation> createAggregate(final Bytes32 attestationHashTreeRoot); @Override void sendAggregateAndProof(final SignedAggregateAndProof signedAggregateAndProof); @Override void subscribeToBeaconCommitteeForAggregation(
      final int committeeIndex, final UInt64 aggregationSlot); @Override void subscribeToPersistentSubnets(final Set<SubnetSubscription> subnetSubscriptions); Optional<T> get(
      final ValidatorApiMethod apiMethod,
      final Map<String, String> queryParams,
      final Class<T> responseClass);  }