DoubleValue implements Value { @Override public String toString() { return new DecimalFormat("0.000", DecimalFormatSymbols.getInstance(Locale.ENGLISH)).format(value); } DoubleValue(Object value);  DoubleValue(double value); @Override String toString(); @Override Object getValue(); @Override long asLong(); @Override double asDouble(); @Override String asString();  }
@Test public void test() { double value = 123.456789; assertThat(new DoubleValue(value).toString(), is("123.457")); }