### Question:
Strings { public static String toStringOrEmpty(Object value) { return toStringOr("", value); } private  Strings(); static String join(Iterable<? extends T> objects, String separator); static String join(Iterable<? extends T> objects); static String join(T o1, T o2); static String join(T o1, T o2, T o3); static String join(T o1, T o2, T o3, T o4); static String join(T o1, T o2, T o3, T o4, T o5); static String join(T o1, T o2, T o3, T o4, T o5, T o6); static String join(T o1, T o2, T o3, T o4, T o5, T o6, T o7); static String join(T o1, T o2, T o3, T o4, T o5, T o6, T o7, T o8); static String join(T o1, T o2, T o3, T o4, T o5, T o6, T o7, T o8, T o9); static String join(T o1, T o2, T o3, T o4, T o5, T o6, T o7, T o8, T o9, T o10); static String join(T o1, T o2, T o3, T o4, T o5, T o6, T o7, T o8, T o9, T o10, T... o11on); static String toStringOrNull(Object value); static String toStringOrNull(BigDecimal value); static String toStringOrEmpty(Object value); static String toStringOrEmpty(BigDecimal value); static String toStringOr(String alternative, Object value); static String toStringOr(String alternative, BigDecimal value); static boolean isNullOrBlank(String value); static Predicate<String> whereNullOrBlank(); static Predicate<String> whereBlank();  }### Answer:
@Test public void convertsObjectToStringIfNotNullForToStringOrEmpty() { Object value = new Object() { @Override public String toString() { return "string value"; } }; String result = Strings.toStringOrEmpty(value); assertThat(result, is("string value")); }
@Test public void convertsObjectToAlternativeIfNullForToStringOrEmpty() { Object value = null; String result = Strings.toStringOrEmpty(value); assertThat(result, is("")); }
@Test public void convertsBigDecimalToStringIfNotNullForToStringOrEmpty() { BigDecimal value = new BigDecimal("1234.5") .movePointRight(5) .setScale(-5, BigDecimal.ROUND_HALF_EVEN); String result = Strings.toStringOrEmpty(value); assertThat(result, is("123400000")); }
@Test public void convertsBigDecimalToAlternativeIfNullForToStringOrEmpty() { BigDecimal value = null; String result = Strings.toStringOrEmpty(value); assertThat(result, is("")); }