use of tech.pegasys.teku.validator.api.AttesterDuties in project teku by ConsenSys.
the class AttestationDutyLoaderTest method shouldSendSubscriptionRequestsWhenAllDutiesAreScheduled.
@Test
void shouldSendSubscriptionRequestsWhenAllDutiesAreScheduled() {
when(validatorApiChannel.getAttestationDuties(UInt64.ONE, VALIDATOR_INDICES)).thenReturn(SafeFuture.completedFuture(Optional.of(new AttesterDuties(dataStructureUtil.randomBytes32(), emptyList()))));
final SafeFuture<Optional<SlotBasedScheduledDuties<?, ?>>> result = dutyLoader.loadDutiesForEpoch(UInt64.ONE);
assertThat(result).isCompleted();
verify(beaconCommitteeSubscriptions).sendRequests();
}
Aggregations