### Question:
TransportBinding { @Override public String toString() { if (isUDP && isSMS && isQueueMode) { return "UQS"; } StringBuilder builder = new StringBuilder(3); if (isUDP) { builder.append('U'); } if (isSMS) { builder.append('S'); } if (isQueueMode) { builder.append('Q'); } return builder.toString(); } TransportBinding(boolean isUDP, boolean isSMS, boolean isQueueMode); static TransportBinding parse(String binding); boolean isQueueMode(); boolean isSMS(); boolean isUDP(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final TransportBinding DEFAULT; }### Answer:
@Test public void toStringTest() throws Exception { assertEquals(new TransportBinding(true, false, false).toString(), "U"); assertEquals(new TransportBinding(true, true, true).toString(), "UQS"); assertEquals(new TransportBinding(false, true, true).toString(), "SQ"); assertEquals(new TransportBinding(true, true, false).toString(), "US"); }