@Test
public void testToStringObfuscatesPasswords() {

   HashMap<String, Object> params = new HashMap<>();
   params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "secret_password");
   params.put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, "secret_password");
   TransportConfiguration configuration = new TransportConfiguration("SomeClass", params, null);
   Assert.assertThat(configuration.toString(), not(containsString("secret_password")));
}