### Question:
ParetoDistribution extends AbstractContinuousDistribution { @Override public double density(double x) { if (x < scale) { return 0; } return Math.pow(scale, shape) / Math.pow(x, shape + 1) * 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 testDensity() { final double[] x = new double[] {-2, -1, 0, 1, 2}; checkDensity(1, 1, x, new double[] {0.00, 0.00, 0.00, 1.00, 0.25}); checkDensity(1.1, 1, x, new double[] {0.000, 0.000, 0.000, 0.000, 0.275}); }