RandomMetricsProvider { public double next() { return rnd.nextDouble() * (max - min) + min; } RandomMetricsProvider(double min, double max); double next();  }
@Test public void testReturnSingle() { double from = 5.25; double to = 5.40; RandomMetricsProvider provider = new RandomMetricsProvider(from, to); double metric = provider.next(); assertTrue("Generated metric should be in range", from < metric && metric < to); }