### Question:
StatisticsSetImplementation implements StatisticsSet { public synchronized void addValue(LongIndex index, long value) { if (!index.isTransient()) { m_longData[index.getValue()] += value; m_zero &= value == 0; } } StatisticsSetImplementation(StatisticsIndexMap statisticsIndexMap);   StatisticsSetImplementation(StatisticsIndexMap statisticsIndexMap,
                              ObjectInput in, Serialiser serialiser); synchronized void reset(); synchronized StatisticsSet snapshot(); synchronized long getValue(LongIndex index); synchronized double getValue(DoubleIndex index); synchronized void setValue(LongIndex index, long value); synchronized void setValue(DoubleIndex index, double value); synchronized void addValue(LongIndex index, long value); synchronized void addValue(DoubleIndex index, double value); synchronized void addSample(LongSampleIndex index, long value); synchronized void addSample(DoubleSampleIndex index, double value); synchronized void reset(LongSampleIndex index); synchronized void reset(DoubleSampleIndex index); long getSum(LongSampleIndex index); double getSum(DoubleSampleIndex index); long getCount(SampleIndex index); double getVariance(SampleIndex index); synchronized void add(ImmutableStatisticsSet operand); synchronized boolean isZero(); synchronized boolean isComposite(); synchronized void setIsComposite(); synchronized boolean equals(Object o); int hashCode(); synchronized String toString();  }### Answer:
@Test public void testAddValue() throws Exception { final StatisticsSetImplementation statistics0 = new StatisticsSetImplementation(m_indexMap); final StatisticsSetImplementation statistics1 = new StatisticsSetImplementation(m_indexMap); statistics0.addValue(m_longIndex1, 700); statistics0.addValue(m_longIndex1, 300); assertTrue(!statistics0.equals(statistics1)); statistics1.addValue(m_longIndex1, 500); assertTrue(!statistics0.equals(statistics1)); statistics1.addValue(m_longIndex1, 500); assertEquals(statistics0, statistics1); statistics0.addValue(m_doubleIndex1, 7.00d); statistics0.addValue(m_doubleIndex1, 3.00d); assertTrue(!statistics0.equals(statistics1)); statistics1.addValue(m_doubleIndex1, 5.00d); assertTrue(!statistics0.equals(statistics1)); statistics1.addValue(m_doubleIndex1, 5.00d); assertEquals(statistics0, statistics1); }