### Question:
BoxAndWhiskerCalculator { public static BoxAndWhiskerItem calculateBoxAndWhiskerStatistics( List<Number> values) { return calculateBoxAndWhiskerStatistics(values, true); }  static BoxAndWhiskerItem calculateBoxAndWhiskerStatistics(
                                        List<Number> values); static BoxAndWhiskerItem calculateBoxAndWhiskerStatistics(
            List<Number> values, boolean stripNullAndNaNItems); static double calculateQ1(List<Number> values); static double calculateQ3(List<Number> values);  }### Answer:
@Test public void testCalculateBoxAndWhiskerStatistics() { try { BoxAndWhiskerCalculator.calculateBoxAndWhiskerStatistics(null); fail("IllegalArgumentException should have been thrown on a null key"); } catch (IllegalArgumentException e) { assertEquals("Null 'values' argument.", e.getMessage()); } List<Number> values = new ArrayList<Number>(); values.add(1.1); BoxAndWhiskerItem item = BoxAndWhiskerCalculator.calculateBoxAndWhiskerStatistics(values); assertEquals(1.1, item.getMean().doubleValue(), EPSILON); assertEquals(1.1, item.getMedian().doubleValue(), EPSILON); assertEquals(1.1, item.getQ1().doubleValue(), EPSILON); assertEquals(1.1, item.getQ3().doubleValue(), EPSILON); }
@Test public void test1593149() { ArrayList<Number> theList = new ArrayList<Number>(5); theList.add(0, 1.0); theList.add(1, 2.0); theList.add(2, Double.NaN); theList.add(3, 3.0); theList.add(4, 4.0); BoxAndWhiskerItem theItem = BoxAndWhiskerCalculator.calculateBoxAndWhiskerStatistics(theList); assertEquals(1.0, theItem.getMinRegularValue().doubleValue(), EPSILON); assertEquals(4.0, theItem.getMaxRegularValue().doubleValue(), EPSILON); }