DataSourceDestination implements Destination { @Override public String toString() { return "DataSourceDestination [dataSource=" + dataSource + "]"; } DataSourceDestination(@Nonnull DataSource dataSource); static DataSourceDestination with(@Nonnull DataSource dataSource); @Override Connection getConnection(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void toStringWorks() { DataSource dataSource1 = mock(DataSource.class); when(dataSource1.toString()).thenReturn("dataSource1"); assertEquals("DataSourceDestination [dataSource=dataSource1]", new DataSourceDestination(dataSource1).toString()); }