### Question:
CensoredDescriptives { public static double mean(AssociativeArray2D survivalFunction) { if(survivalFunction.isEmpty()) { throw new IllegalArgumentException("The provided collection can't be empty."); } return ar(survivalFunction, 0); }  static AssociativeArray2D survivalFunction(FlatDataCollection flatDataCollection); static double median(AssociativeArray2D survivalFunction); static double mean(AssociativeArray2D survivalFunction); static double meanVariance(AssociativeArray2D survivalFunction); static double meanStd(AssociativeArray2D survivalFunction); static final String CENSORED_NUMBER_POSTFIX; }### Answer:
@Test public void testMean() { logger.info("mean"); AssociativeArray2D survivalFunction = CensoredDescriptives.survivalFunction(generateFlatDataCollection()); double expResult = 10.0875; double result = CensoredDescriptives.mean(survivalFunction); assertEquals(expResult, result, Constants.DOUBLE_ACCURACY_HIGH); }