Tools { public static String fm(String message, Object... values) { if (StringUtils.isBlank(message) || ArrayUtils.isEmpty(values)) { return message; } return MessageFormatter.arrayFormat(message, values).getMessage(); } private  Tools(); static String toString(Object value); static String joinNonEmpty(String[] array, char separator); static String marshalToXml(Object obj, Class sourceClass); @SuppressWarnings("unchecked") static String marshalToXml(T obj, QName qName); @SuppressWarnings("unchecked") static T unmarshalFromXml(String xml, Class<T> targetClass); static OffsetDateTime toUTC(OffsetDateTime localDateTime); static OffsetDateTime fromUTC(OffsetDateTime utcTime); static OffsetDateTime fromUTC(long utcMillis); static Set<String> getAllKnownPropertyNames(ConfigurableEnvironment env); static Properties getPropertiesWithPrefix(ConfigurableEnvironment env, String propertyNamePrefix); static String fm(String message, Object... values);  }
@Test public void testFm() { assertThat(fm(""), is("")); assertThat(fm("empty"), is("empty")); assertThat(fm("{} > {}", 2, 1), is("2 > 1")); }