@Test public void testAdd() throws Exception { Value victim = new Value(); Double[] testValues = new Double[]{1.0, -1.0, 2.0, 2.1, 0.0, 53.0, -27.5}; double sum = 0.0; for (Double value : testValues) { victim.add(value); sum += value; } assertEquals(sum,victim.getSum(), EPSILON); }
public final void add(final double value) { sum += value; count++; }
Value { public final void add(final double value) { sum += value; count++; } }
Value { public final void add(final double value) { sum += value; count++; }  }
Value { public final void add(final double value) { sum += value; count++; }  final double getValue(); final double getSum(); final long getCount(); final void add(final double value); final void addInterpolated(final double value); final boolean valueIsInterpolated(); final void remove(final double value); }
Value { public final void add(final double value) { sum += value; count++; }  final double getValue(); final double getSum(); final long getCount(); final void add(final double value); final void addInterpolated(final double value); final boolean valueIsInterpolated(); final void remove(final double value);  }