### Question:
MessageUtils { public static String format(String pattern, Object... arguments) { pattern = pattern.replace("'", "''"); MessageFormat messageFormat = new MessageFormat(pattern); if (arguments != null && arguments.length > 0) { Format[] formats = messageFormat.getFormatsByArgumentIndex(); for (int i = 0; i < arguments.length; i++) { if (formats.length <= i) { continue; } if (arguments[i] != null && arguments[i] instanceof Number && formats[i] == null) { arguments[i] = arguments[i].toString(); } } } return messageFormat.format(arguments); } private  MessageUtils(); static String format(String pattern, Object... arguments); static String getMessage(String code, Object... additions);  }### Answer:
@Test public void testFormat() { String message; message = MessageUtils.format("{0}", 12345.6789); assertEquals("12345.6789", message); }