### Question:
BasicOddsRatio extends BasicRatio { @Override public boolean isDefined() { return super.isDefined() && isAdmissible(d_subject) && isAdmissible(d_baseline); } BasicOddsRatio(RateMeasurement baseline, RateMeasurement subject); String getName(); @Override AxisType getAxisType(); @Override boolean isDefined(); @Override Double getError(); RelativeEffect<RateMeasurement> getCorrected();  }### Answer:
@Test public void testZeroBaselineRateShouldBeUndefined() { RateMeasurement base = new BasicRateMeasurement(0, 100); RateMeasurement subj = new BasicRateMeasurement(50, 100); BasicOddsRatio or = new BasicOddsRatio(base, subj); assertFalse(or.isDefined()); }
@Test public void testFullSubjectRateShouldBeUndefined() { RateMeasurement base = new BasicRateMeasurement(50, 100); RateMeasurement subj = new BasicRateMeasurement(100, 100); BasicOddsRatio or = new BasicOddsRatio(base, subj); assertFalse(or.isDefined()); }
@Test public void testZeroSubjectRateShouldBeUndefined() { RateMeasurement base = new BasicRateMeasurement(50, 100); RateMeasurement subj = new BasicRateMeasurement(0, 100); BasicOddsRatio or = new BasicOddsRatio(base, subj); assertFalse(or.isDefined()); }
@Test public void testFullBaselineRateShouldBeUndefined() { RateMeasurement base = new BasicRateMeasurement(100, 100); RateMeasurement subj = new BasicRateMeasurement(50, 100); BasicOddsRatio or = new BasicOddsRatio(base, subj); assertFalse(or.isDefined()); }