class RemoteService implements RemoteServiceInterface {

  @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);
    }
    return waitTime <= THRESHOLD ? value * 10 : FAILURE;
  }

  private  RemoteService();
    RemoteService(RandomProvider randomProvider);

}