assertEquals("wrong formatting", "x: 1.12", formattedObject.toString());
}
@Test
public void testLocaleDependence() {
final FormattedObject formattedObject = new FormattedObject(1.1234, "%.3f");
assertEquals("wrong formatting", "1.123", formattedObject.toString());
Locale.setDefault(new Locale("de"));
// the format is evaluated only once
assertEquals("no support for on-the-fly-changes of locale", "1.123", formattedObject.toString());
// FormattedObject does not caches the formats
assertEquals("formatting should be locale dependent", "1,123", new FormattedObject(1.1234, "%.3f").toString());
}