### Question:
Pql { public static String toString(Value value) { Object unwrappedValue = getCsvValue(value); if (unwrappedValue == null) { return ""; } else { return unwrappedValue.toString(); } } private  Pql(); static Value createValue(Object value); static String toString(Value value); static Object getApiValue(Value value); static Object getNativeValue(Value value); static Object getCsvValue(Value value); static List<String[]> resultSetToStringArrayList(ResultSet resultSet); static String resultSetToString(ResultSet resultSet); static List<String> getColumnLabels(ResultSet resultSet); static List<String> getRowStringValues(Row row); static ResultSet combineResultSets(ResultSet first, ResultSet second);  }### Answer:
@Test public void testToString() { assertEquals("value1", Pql.toString(textValue1)); assertEquals("false", Pql.toString(booleanValue1)); assertEquals("1", Pql.toString(numberValue1)); assertEquals("2012-12-02T12:45:00+08:00", Pql.toString(dateTimeValue1)); assertEquals("2012-12-02", Pql.toString(dateValue1)); assertEquals("2012-12-02", Pql.toString(dateSetValue)); assertEquals("2012-12-02T12:45:00+08:00", Pql.toString(dateTimeSetValue)); assertEquals("value1,\"comma,separated\"", Pql.toString(commaTextSetValue)); }
@Test public void testToString_null() { assertEquals("", Pql.toString(new TextValue())); assertEquals("", Pql.toString(new BooleanValue())); assertEquals("", Pql.toString(new NumberValue())); assertEquals("", Pql.toString(new DateTimeValue())); assertEquals("", Pql.toString(new DateValue())); assertEquals("", Pql.toString(new SetValue())); }
@Test public void testToString_invalidValue() { thrown.expect(IllegalArgumentException.class); Pql.toString(new MyValue()); }