### Question:
ClientTimestamp extends ClientLiteral<Timestamp, ClientTimestamp> { @Override public String toString() { final String resultFormat; String formattedValue; final Timestamp value = getValue(); try { formattedValue = TIMESTAMP_ADAPTER.marshal(value); } catch (Exception e) { formattedValue = ClientExpressions.MISSING_REPRESENTATION; } String preciselyMidnightRegex = "(00:?){3}(\\.0+)?$"; if (Pattern.matches("[\\d-T\\s]*" + preciselyMidnightRegex, formattedValue)) { resultFormat = formattedValue.replaceFirst("[\\sT]" + preciselyMidnightRegex, ""); } else if (formattedValue.contains(".") && Pattern.matches("[\\d-T\\s:]*(\\.0+)?$", formattedValue)) { resultFormat = formattedValue.substring(0, formattedValue.indexOf(".")); } else { resultFormat = formattedValue; } return "ts'" + resultFormat + "'"; } ClientTimestamp();  ClientTimestamp(Timestamp timestamp);  ClientTimestamp(ClientTimestamp t); @Override @XmlJavaTypeAdapter(ELTimestampAdapter.class) Timestamp getValue(); @Override ClientTimestamp setValue(Timestamp value); @Override ClientTimestamp deepClone(); static ClientTimestamp valueOf(String string); @Override String toString(); @Override void accept(ClientELVisitor visitor); static final String EXPRESSION_ID; }### Answer:
@Test @Override public void generatedStringBeginsWithClassName() { assertEquals(FORMATTED_TIMESTAMP_TO_STRING, fullyConfiguredTestInstance.toString()); }
@Test public void generatedStringForNullTimestampReturnsExceptionString() { ClientTimestamp instance = new ClientTimestamp(((Timestamp) null)); assertEquals(instance.toString(), NON_PARCELABLE_TIMESTAMP_TO_STRING); }