TeradataTimePeriod extends DbStruct { @Override public String toString() { String r = ""; try { Object[] a = super.getAttributes(); for (int i = 0; i < a.length; i++) { if (i > 0) { r = r + ","; } r = r + a[i].toString(); } } catch (SQLException e) { System.out.println("TeradataTimePeriod: toString: caught exception"); } return r; } TeradataTimePeriod(Object[] dates); @Override String toString(); @Override boolean equals(Object other);  }
@Test public void toStringTest() { String fromStr = "01:23:45"; String toStr = "12:13:14"; Time fromTime = null; Time toTime = null; fromTime = Time.valueOf(fromStr); toTime = Time.valueOf(toStr); Time[] range = {fromTime, toTime}; TeradataTimePeriod tdp = new TeradataTimePeriod(range); assertEquals("Time periods toString does return expected value", fromTime.toString() + "," + toTime.toString(), tdp.toString()); }