DriverManagerDestination implements Destination { @Override public String toString() { return "DriverManagerDestination [url=" + url + ", user=" + user + ", password=" + password + "]"; } DriverManagerDestination(@Nonnull String url, String user, String password); static DriverManagerDestination with(@Nonnull String url, String user, String password); @Override Connection getConnection(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void toStringWorks() { assertEquals("DriverManagerDestination [url=theUrl, user=theUser, password=thePassword]", new DriverManagerDestination("theUrl", "theUser", "thePassword").toString()); assertEquals("DriverManagerDestination [url=theUrl, user=null, password=null]", new DriverManagerDestination("theUrl", null, null).toString()); }