### Question:
ContinuousDistributions { public static double uniformCdf(double x, double a, double b) { if(a>=b) { throw new IllegalArgumentException("The a must be smaller than b."); } double probabilitySum; if(x<a) { probabilitySum=0.0; } else if(x<b) { probabilitySum=(x-a)/(b-a); } else { probabilitySum=1; } return probabilitySum; }  static double chisquareCdf(double x, int df); static double gaussCdf(double z); static double gamma(double x); static double logGamma(double Z); static double studentsCdf(double x, int df); static double exponentialCdf(double x, double lamda); static double betaCdf(double x, double a, double b); static double fCdf(double x, int f1, int f2); static double gammaCdf(double x, double a, double b); static double uniformCdf(double x, double a, double b); static double kolmogorov(double z); static double gaussInverseCdf(double p); static double chisquareInverseCdf(double p, int df); static double normalQuantile(double p, double mu, double sigma); static double dirichletPdf(double[] pi, double[] ai); static double dirichletPdf(double[] pi, double a); static double[] multinomialGaussianSample(double[] mean, double[][] covariance); static double multinomialGaussianPdf(double[] mean, double[][] covariance, double[] x);  }### Answer:
@Test public void testUniformCdf() { logger.info("UniformCdf"); double x = 3.0; double a = 2.0; double b = 10.0; double expResult = 0.125; double result = ContinuousDistributions.uniformCdf(x, a, b); assertEquals(expResult, result, Constants.DOUBLE_ACCURACY_HIGH); }