class RandomThrottleGate implements ThrottleGate {

    @Override
    public boolean isOpen() {
        double chance = randomNumberGenerator.nextDouble();
        boolean result = chance <= throttleGateLikelihood;
        log.debug(String.format("Generated random number %.2f, which is %s than throttleGateLikelihood (%.2f). ThrottleGate is %s.",
                chance,
                (result ? "less" : "greater"),
                throttleGateLikelihood,
                (result ? "OPEN" : "CLOSED")));
        return result;
    }

    public  RandomThrottleGate(double throttleGateLikelihood);

}