### Question:
BasicRiskRatio extends BasicRatio { @Override public Double getError() { if (!isDefined()) return Double.NaN; double a = getA(); double n1 = a + getB(); double c = getC(); double n2 = c + getD(); return Math.sqrt((1.0 / a) + (1.0 / c) - (1.0 / n1) - (1.0 / n2)); } BasicRiskRatio(RateMeasurement baseline, RateMeasurement subject); @Override String toString(); @Override Double getError(); String getName(); @Override boolean isDefined(); RelativeEffect<RateMeasurement> getCorrected();  }### Answer:
@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); }