ColumnInfoToStringEncoderDecoder { public static String encode(List<ColumnInfo> columnInfos) { Preconditions.checkNotNull(columnInfos); return Joiner.on(COLUMN_INFO_DELIMITER) .skipNulls() .join(columnInfos); } private  ColumnInfoToStringEncoderDecoder(); static String encode(List<ColumnInfo> columnInfos); static List<ColumnInfo> decode(final String columnInfoStr);  }
@Test public void testEncode() { final ColumnInfo columnInfo = new ColumnInfo("col1", PVarchar.INSTANCE.getSqlType()); final String encodedColumnInfo = ColumnInfoToStringEncoderDecoder.encode(Lists.newArrayList(columnInfo)); assertEquals(columnInfo.toString(),encodedColumnInfo); }