### Question:
StatisticsSetImplementation implements StatisticsSet { public synchronized String toString() { final StringBuilder result = new StringBuilder(); result.append("StatisticsSet = {{"); for (int i = 0; i < m_longData.length; i++) { if (i != 0) { result.append(", "); } result.append(m_longData[i]); } result.append("}, {"); for (int i = 0; i < m_doubleData.length; i++) { if (i != 0) { result.append(", "); } result.append(m_doubleData[i]); } result.append("}, {"); for (int i = 0; i < m_transientLongData.length; i++) { if (i != 0) { result.append(", "); } result.append(m_transientLongData[i]); } result.append("}, composite = "); result.append(m_composite ? "true" : "false"); result.append("}"); return result.toString(); } 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 testToString() throws Exception { final StatisticsSet rawStatistics = new StatisticsSetImplementation(m_indexMap); final String s0 = rawStatistics.toString(); assertTrue(s0.indexOf(commaSeparate(m_indexMap.getNumberOfLongs(), "0")) >= 0); assertTrue(s0.indexOf( commaSeparate(m_indexMap.getNumberOfTransientLongs(), "0")) >= 0); assertTrue(s0.indexOf(commaSeparate(m_indexMap.getNumberOfDoubles(), "0.0")) >= 0); assertTrue(s0.indexOf("composite = false") >= 0); rawStatistics.setIsComposite(); assertTrue(rawStatistics.toString().indexOf("composite = true") >= 0); }
@Test public void testToString2() throws Exception { final StatisticsIndexMap statisticsIndexMap2 = new StatisticsIndexMap(asList("a"), asList("b"), asList("c", "d"), asList("timedTests")); final StatisticsSet rawStatistics = new StatisticsSetImplementation(statisticsIndexMap2); assertEquals( "StatisticsSet = {{0, 0, 0}, {0.0, 0.0}, {0, 0}, composite = false}", rawStatistics.toString().toString()); }