### Question:
CompositeKey implements Serializable { @Override public String toString() { return getClass().getSimpleName() + " [" + StringUtils.join(values, ",") + "]"; } CompositeKey(Object...values); Object get(int i); boolean equals(int i, Object o); int size(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final CompositeKey EMPTY; }### Answer:
@Test public void testToString() { assertEquals("CompositeKey []", new CompositeKey().toString()); assertEquals("CompositeKey []", new CompositeKey((Object[]) null).toString()); assertEquals("CompositeKey [a]", new CompositeKey("a").toString()); assertEquals("CompositeKey [a,b]", new CompositeKey("a", "b").toString()); assertEquals("CompositeKey [a,1,true]", new CompositeKey("a", 1, true).toString()); }