@Override
  public long doRemoteFunction(int value) {

    long waitTime = (long) Math.floor(randomProvider.random() * 1000);

    try {
      sleep(waitTime);
    } catch (InterruptedException e) {
      LOGGER.error("Thread sleep state interrupted", e);
      Thread.currentThread().interrupt();
    }
    return waitTime <= THRESHOLD ? value * 10
        : RemoteServiceStatus.FAILURE.getRemoteServiceStatusValue();
  }
@Test
  void testFailedCall() {
    var remoteService = new RemoteService(new StaticRandomProvider(0.21));
    var result = remoteService.doRemoteFunction(10);
    assertEquals(RemoteServiceStatus.FAILURE.getRemoteServiceStatusValue(), result);
  }