UtilizationModelStochastic extends UtilizationModelAbstract { public final void setRandomGenerator(final ContinuousDistribution randomGenerator) { this.randomGenerator = Objects.requireNonNull(randomGenerator); } UtilizationModelStochastic();  UtilizationModelStochastic(final Unit unit);  UtilizationModelStochastic(final Unit unit, final long seed);  UtilizationModelStochastic(final long seed);  UtilizationModelStochastic(final ContinuousDistribution prng);  UtilizationModelStochastic(final Unit unit, final ContinuousDistribution prng); void saveHistory(final String filename); @SuppressWarnings("unchecked") void loadHistory(final String filename); ContinuousDistribution getRandomGenerator(); final void setRandomGenerator(final ContinuousDistribution randomGenerator); boolean isHistoryEnabled(); UtilizationModelStochastic setHistoryEnabled(final boolean enable); boolean isAlwaysGenerateNewRandomUtilization(); UtilizationModelStochastic setAlwaysGenerateNewRandomUtilization(final boolean alwaysGenerateNewRandomUtilization);  }
@Test public void testGetUtilizationNegativeRandomNumber() { final UniformDistr prng = new NegativePrng(); utilizationModel.setRandomGenerator(prng); System.out.println("Generated Pseudo Random Number: " + prng.sample()); final double expected = 1; final double result = utilizationModel.getUtilization(); assertEquals(expected, result); }