### Question:
BasicStatistic implements Result { @Override public String toString() { String str = columnCombination.toString() + COLUMN_VALUE_SEPARATOR; for (Map.Entry<String, BasicStatisticValue> entry : this.statisticMap.entrySet()) { str += entry.getKey() + NAME_COLUMN_SEPARATOR + entry.getValue() + STATISTIC_SEPARATOR; } return str; } protected  BasicStatistic();  BasicStatistic(ColumnIdentifier... columnIdentifier);  BasicStatistic(Map<String, BasicStatisticValue> statisticMap, ColumnIdentifier... columnIdentifier); void addStatistic(String statisticName, BasicStatisticValue statisticValue); ColumnCombination getColumnCombination(); void setColumnCombination(ColumnCombination columnCombination); Map<String, BasicStatisticValue> getStatisticMap(); void setStatisticMap(Map<String, BasicStatisticValue> statisticMap); @Override @XmlTransient void sendResultTo(OmniscientResultReceiver resultReceiver); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static final String NAME_COLUMN_SEPARATOR; static final String COLUMN_VALUE_SEPARATOR; static final String STATISTIC_SEPARATOR; }### Answer:
@Test public void testToString() { String expectedStatisticName1 = "Min"; BasicStatisticValueString expectedStatisticValue1 = new BasicStatisticValueString("minValue"); String expectedStatisticName2 = "Max"; BasicStatisticValueString expectedStatisticValue2 = new BasicStatisticValueString("maxValue"); ColumnIdentifier expectedColumn = new ColumnIdentifier("table42", "column23"); ColumnCombination expectedColumnCombination = new ColumnCombination(expectedColumn); BasicStatistic statistic = new BasicStatistic(expectedColumn); statistic.addStatistic(expectedStatisticName1, expectedStatisticValue1); statistic.addStatistic(expectedStatisticName2, expectedStatisticValue2); String expectedString1 = expectedColumnCombination + BasicStatistic.COLUMN_VALUE_SEPARATOR + expectedStatisticName2 + BasicStatistic.NAME_COLUMN_SEPARATOR + expectedStatisticValue2 + BasicStatistic.STATISTIC_SEPARATOR + expectedStatisticName1 + BasicStatistic.NAME_COLUMN_SEPARATOR + expectedStatisticValue1 + BasicStatistic.STATISTIC_SEPARATOR; String expectedString2 = expectedColumnCombination + BasicStatistic.COLUMN_VALUE_SEPARATOR + expectedStatisticName1 + BasicStatistic.NAME_COLUMN_SEPARATOR + expectedStatisticValue1 + BasicStatistic.STATISTIC_SEPARATOR + expectedStatisticName2 + BasicStatistic.NAME_COLUMN_SEPARATOR + expectedStatisticValue2 + BasicStatistic.STATISTIC_SEPARATOR; assertTrue(expectedString1.equals(statistic.toString()) || expectedString2.equals(statistic.toString())); }