InvertedRunningAverage implements RunningAverage { @Override public void addDatum(double datum) { throw new UnsupportedOperationException(); } InvertedRunningAverage(RunningAverage delegate); @Override void addDatum(double datum); @Override void removeDatum(double datum); @Override void changeDatum(double delta); @Override int getCount(); @Override double getAverage(); @Override RunningAverage inverse();  }
@Test(expected = UnsupportedOperationException.class) public void testUnsupported1() { RunningAverage inverted = new InvertedRunningAverage(new FullRunningAverage()); inverted.addDatum(1.0); }
@Test(expected = UnsupportedOperationException.class) public void testAndStdDevUnsupported1() { RunningAverage inverted = new InvertedRunningAverageAndStdDev(new FullRunningAverageAndStdDev()); inverted.addDatum(1.0); }