GreekResultCollection implements Iterable<Pair<Greek, Double>> { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("GreekResultCollection["); final List<String> elements = new LinkedList<>(); for (final Map.Entry<Greek, Double> entry : _backingMap.entrySet()) { final StringBuilder elementSb = new StringBuilder(); elementSb.append(entry.getKey()).append("=").append(entry.getValue()); elements.add(elementSb.toString()); } sb.append(StringUtils.join(elements, ", ")); sb.append("]"); return sb.toString(); }  Double get(final Greek greek); void put(final Greek greek, final Double result); boolean isEmpty(); boolean contains(final Greek greek); int size(); Set<Greek> keySet(); Collection<Double> values(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override Iterator<Pair<Greek, Double>> iterator();  }
@Test public void testToString() { final GreekResultCollection grc1 = new GreekResultCollection(); grc1.put(Greek.DELTA, 1.); final String grcToString = grc1.toString(); assertNotNull(grcToString); assertTrue(grcToString.indexOf("GreekResultCollection") != -1); assertTrue(grcToString.indexOf(Greek.DELTA.toString()) != -1); }