Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Oct 17, 2023
1 parent 1b14966 commit 735906c
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,8 @@ void setUp(final SpecContext specContext) {
.thenAnswer(
args -> {
final Validator validator = (Validator) args.getArguments()[0];
return Optional.of(
SafeFuture.completedFuture(
createSignedValidatorRegistration(validator.getPublicKey())));
return SafeFuture.completedFuture(
createSignedValidatorRegistration(validator.getPublicKey()));
});

when(proposerConfigPropertiesProvider.isReadyToProvideProperties()).thenReturn(true);
Expand Down Expand Up @@ -251,11 +250,10 @@ void registerValidatorsEvenIfOneRegistrationSigningFails() {
args -> {
final Validator validator = (Validator) args.getArguments()[0];
if (validator.equals(validator2)) {
return Optional.of(SafeFuture.failedFuture(new IllegalStateException("oopsy")));
return SafeFuture.failedFuture(new IllegalStateException("oopsy"));
}
return Optional.of(
SafeFuture.completedFuture(
createSignedValidatorRegistration(validator.getPublicKey())));
return SafeFuture.completedFuture(
createSignedValidatorRegistration(validator.getPublicKey()));
});
runRegistrationFlowWithSubscription(0);

Expand All @@ -264,9 +262,8 @@ void registerValidatorsEvenIfOneRegistrationSigningFails() {
.thenAnswer(
args -> {
final Validator validator = (Validator) args.getArguments()[0];
return Optional.of(
SafeFuture.completedFuture(
createSignedValidatorRegistration(validator.getPublicKey())));
return SafeFuture.completedFuture(
createSignedValidatorRegistration(validator.getPublicKey()));
});
runRegistrationFlowWithSubscription(1);

Expand Down

0 comments on commit 735906c

Please sign in to comment.