DiscreteDistribution extends Distribution { @Override protected double calculateProbability() { double x = ((IntegerInputValue) inputValues.get("X")).getValue(); double y = ((IntegerInputValue) inputValues.get("Y")).getValue(); return x / y; } DiscreteDistribution();   }
@Test public void testCalculateProbability() { System.out.println("calculateProbability"); assertEquals("When X=1 and Y=2, probab should be 0.5",0.5,distrib.getProbability(),0.0000001); }