### Question:
ConstantContinuousDistribution extends AbstractContinuousDistribution { @Override public ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng) { return this::getSupportLowerBound; } ConstantContinuousDistribution(double value); @Override double density(double x); @Override double cumulativeProbability(double x); @Override double inverseCumulativeProbability(final double p); @Override double getMean(); @Override double getVariance(); @Override double getSupportLowerBound(); @Override double getSupportUpperBound(); @Override boolean isSupportConnected(); @Override ContinuousDistribution.Sampler createSampler(final UniformRandomProvider rng);  }### Answer:
@Test @Override void testSampler() { final double value = 12.345; final ContinuousDistribution.Sampler sampler = new ConstantContinuousDistribution(value).createSampler(null); for (int i = 0; i < 10; i++) { Assertions.assertEquals(value, sampler.sample()); } }