Objects { static String toString(final Object o) { return (o == null) ? "null" : o.toString(); }    }
@Test public void toString_nullValueAsParam_returnNullString() { final Object objectA = null; final String nullString = Objects.toString(objectA); assertThat(nullString, is(notNullValue())); assertThat(nullString, is("null")); }
@Test public void toString_nonNullValueAsParam_returnObjectToStringValue() { final Object objectA = new Object() { @Override public String toString() { return "notNull"; } }; final String nonNullString = Objects.toString(objectA); assertThat(nonNullString, is(nonNullString)); assertThat(nonNullString, is("notNull")); }