Tools { public static String toString(Object value) { return ((value == null) ? null : String.valueOf(value)); } 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 testToString() { Integer i = null; assertNull(Tools.toString(i)); i = 2; assertEquals("2", Tools.toString(i)); }