### Question:
HypergeometricDistribution extends AbstractDiscreteDistribution { @Override public double probability(int x) { final double logProbability = logProbability(x); return logProbability == Double.NEGATIVE_INFINITY ? 0 : Math.exp(logProbability); } HypergeometricDistribution(int populationSize,
                                      int numberOfSuccesses,
                                      int sampleSize); @Override double cumulativeProbability(int x); int getNumberOfSuccesses(); int getPopulationSize(); int getSampleSize(); @Override double probability(int x); @Override double logProbability(int x); double upperCumulativeProbability(int x); @Override double getMean(); @Override double getVariance(); @Override int getSupportLowerBound(); @Override int getSupportUpperBound(); @Override boolean isSupportConnected();  }### Answer:
@Test void testZeroTrial() { final int n = 11; final int m = 4; final int s = 0; final HypergeometricDistribution dist = new HypergeometricDistribution(n, m, 0); for (int i = 1; i <= n; i++) { final double p = dist.probability(i); Assertions.assertEquals(0, p, () -> "p=" + p); } }
@Test void testMath1356() { final int n = 11; final int m = 11; for (int s = 0; s <= n; s++) { final HypergeometricDistribution dist = new HypergeometricDistribution(n, m, s); final double p = dist.probability(s); Assertions.assertEquals(1, p, () -> "p=" + p); } }