### Question:
BasicOddsRatio extends BasicRatio { @Override public Double getError() { if (!isDefined()) return Double.NaN; double a = getA(); double b = getB(); double c = getC(); double d = getD(); return Math.sqrt(1.0/a + 1.0/b + 1.0/c + 1.0/d); } BasicOddsRatio(RateMeasurement baseline, RateMeasurement subject); String getName(); @Override AxisType getAxisType(); @Override boolean isDefined(); @Override Double getError(); RelativeEffect<RateMeasurement> getCorrected();  }### Answer:
@Test public void testGetError() { double expected = Math.sqrt(1/63D + 1/73D + 1/(144D-63D) + 1/(142D-73D)); assertEquals(expected, d_ratioBennie.getError(), 0.001); }
@Test public void testUndefinedShouldResultInNaN() { RateMeasurement rmA1 = new BasicRateMeasurement(0, 100); RateMeasurement rmC1 = new BasicRateMeasurement(50, 100); BasicOddsRatio or = new BasicOddsRatio(rmA1, rmC1); assertEquals(Double.NaN, or.getError(), 0.001); assertEquals(Double.NaN, or.getConfidenceInterval().getPointEstimate(), 0.001); }