### Question:
ClientTypeSignature { @Override public String toString() { if (rawType.equals(ROW)) { return rowToString(); } if (rawType.equals(VARCHAR) && arguments.get(0).getKind() == ParameterKind.LONG && arguments.get(0).getLongLiteral() == VARCHAR_UNBOUNDED_LENGTH) { return "varchar"; } if (arguments.isEmpty()) { return rawType; } return rawType + arguments.stream() .map(ClientTypeSignatureParameter::toString) .collect(joining(",", "(", ")")); } ClientTypeSignature(String rawType); @JsonCreator  ClientTypeSignature(
            @JsonProperty("rawType") String rawType,
            @JsonProperty("arguments") List<ClientTypeSignatureParameter> arguments); @JsonProperty String getRawType(); @JsonProperty List<ClientTypeSignatureParameter> getArguments(); List<ClientTypeSignature> getArgumentsAsTypeSignatures(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static final int VARCHAR_UNBOUNDED_LENGTH; }### Answer:
@Test public void testStringSerialization() { ClientTypeSignature bigint = new ClientTypeSignature(StandardTypes.BIGINT); assertEquals(bigint.toString(), "bigint"); ClientTypeSignature varchar = new ClientTypeSignature(StandardTypes.VARCHAR, ImmutableList.of(ClientTypeSignatureParameter.ofLong(50))); assertEquals(varchar.toString(), "varchar(50)"); ClientTypeSignature array = new ClientTypeSignature(StandardTypes.ARRAY, ImmutableList.of(ClientTypeSignatureParameter.ofType(new ClientTypeSignature(StandardTypes.BIGINT)))); assertEquals(array.toString(), "array(bigint)"); ClientTypeSignature row = new ClientTypeSignature( StandardTypes.ROW, ImmutableList.of( ClientTypeSignatureParameter.ofNamedType(new NamedClientTypeSignature(Optional.of(new RowFieldName("foo")), bigint)), ClientTypeSignatureParameter.ofNamedType(new NamedClientTypeSignature(Optional.of(new RowFieldName("bar")), bigint)))); assertEquals(row.toString(), "row(foo bigint,bar bigint)"); }