@Override
    public double mean() {
        return 1 / lambda;
    }
@Test
    public void testMean() {
        System.out.println("mean");
        ExponentialDistribution instance = new ExponentialDistribution(1.0);
        instance.rand();
        assertEquals(1.0, instance.mean(), 1E-7);
        instance = new ExponentialDistribution(2.0);
        instance.rand();
        assertEquals(0.5, instance.mean(), 1E-7);
        instance = new ExponentialDistribution(3.0);
        instance.rand();
        assertEquals(0.3333333, instance.mean(), 1E-7);
        instance = new ExponentialDistribution(4.0);
        instance.rand();
        assertEquals(0.25, instance.mean(), 1E-7);
    }