/// Test sampling
        /*[Test]  -- assertChiSquareAccept not ported*/
        public void testSampling()
        {
            int[]    densityPoints = makeDensityTestPoints();
            double[] densityValues = makeDensityTestValues();
            int      sampleSize    = 1000;
            int      length        = eliminateZeroMassPoints(densityPoints, densityValues);//TestUtils
            AbstractIntegerDistribution distribution = (AbstractIntegerDistribution)makeDistribution();

            double[] expectedCounts = new double[length];
            long[]   observedCounts = new long[length];
            for (int i = 0; i < length; i++)
            {
                expectedCounts[i] = sampleSize * densityValues[i];
            }
            distribution.reseedRandomGenerator(1000); // Use fixed seed
            int[] sample = distribution.sample(sampleSize);
            for (int i = 0; i < sampleSize; i++)
            {
                for (int j = 0; j < length; j++)
                {
                    if (sample[i] == densityPoints[j])
                    {
                        observedCounts[j]++;
                    }
                }
            }
            // NOT PORTED:
            //TestUtils.assertChiSquareAccept(densityPoints, expectedCounts, observedCounts, .001);
        }