### Question:
ParetoDistribution extends AbstractContinuousDistribution { @Override public double cumulativeProbability(double x) { if (x <= scale) { return 0; } return 1 - Math.pow(scale / x, shape); } ParetoDistribution(double scale,
                              double shape); double getScale(); double getShape(); @Override double density(double x); @Override double logDensity(double x); @Override double cumulativeProbability(double x); @Override double getMean(); @Override double getVariance(); @Override double getSupportLowerBound(); @Override double getSupportUpperBound(); @Override boolean isSupportConnected(); @Override ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng);  }### Answer:
@Test void testExtremeValues() { final ParetoDistribution d = new ParetoDistribution(1, 1); for (int i = 0; i < 1e5; i++) { final double upperTail = d.cumulativeProbability(i); if (i <= 1000) { Assertions.assertTrue(upperTail < 1.0d); } else { Assertions.assertTrue(upperTail > 0.999); } } Assertions.assertEquals(1, d.cumulativeProbability(Double.MAX_VALUE)); Assertions.assertEquals(0, d.cumulativeProbability(-Double.MAX_VALUE)); Assertions.assertEquals(1, d.cumulativeProbability(Double.POSITIVE_INFINITY)); Assertions.assertEquals(0, d.cumulativeProbability(Double.NEGATIVE_INFINITY)); }