@Test
public void toStringDoesNotContainPassword() {

    final String password = "thePassword";
    final String uri = "amqps://foo:" + password + "@host.com:5671";
    final Connection connection = ConnectivityModelFactory.newConnectionBuilder(ID, TYPE, STATUS, uri)
            .sources(Collections.singletonList(SOURCE1))
            .build();
    assertThat(connection.toString()).doesNotContain(password);
}