### Question:
ShardingValueWrapper { public String toString(final String format) { if (value instanceof Date) { return new SimpleDateFormat(format).format(((Date) value).getTime()); } if (value instanceof Number) { return new SimpleDateFormat(format).format(((Number) value).longValue()); } return toString(); } ShardingValueWrapper(final Comparable<?> value); long longValue(); double doubleValue(); Date dateValue(final String format); Date dateValue(); String toString(final String format); @Override String toString();  }### Answer:
@Test public void testString() throws Exception { assertThat(new ShardingValueWrapper((short) 1).toString(), is("1")); assertThat(new ShardingValueWrapper(1).toString(), is("1")); assertThat(new ShardingValueWrapper(1L).toString(), is("1")); assertThat(new ShardingValueWrapper(1.0F).toString(), is("1.0")); assertThat(new ShardingValueWrapper(1.0D).toString(), is("1.0")); assertThat(new ShardingValueWrapper("1").toString(), is("1")); assertThat(new ShardingValueWrapper(NOW).toString(), is(NOW.toString())); assertThat(new ShardingValueWrapper(date).toString(FORMAT_TEXT), is(DATE_TEXT)); assertThat(new ShardingValueWrapper(date.getTime()).toString(FORMAT_TEXT), is(DATE_TEXT)); assertThat(new ShardingValueWrapper(DATE_TEXT).toString(FORMAT_TEXT), is(DATE_TEXT)); }