### Question:
CustomDataSourceContextStrategy implements
        ContextManagementStrategy<ClientCustomDataSource, ClientCustomDataSource>,
        GenericTypeMetadataBuilder<ClientCustomDataSource>,
        ContextParametrizedMetadataBuilder<ClientCustomDataSource, PartialMetadataOptions> { @Override public ClientCustomDataSource getContextForClient(ClientCustomDataSource contextDescription, Map<String, Object> data, Map<String, String[]> additionalProperties) { ClientCustomDataSource copy = new ClientCustomDataSource(contextDescription); final List<ClientProperty> properties = copy.getProperties(); if (properties != null) { Iterator<ClientProperty> iterator = properties.iterator(); for (; iterator.hasNext(); ) { ClientProperty property = iterator.next(); if (propertiesToIgnore.contains(property.getKey())) iterator.remove(); } } return copy; }  @Override ClientCustomDataSource createContext(ClientCustomDataSource contextDescription, Map<String, Object> data); @Override void deleteContext(ClientCustomDataSource contextDescription, Map<String, Object> data); @Override ClientCustomDataSource getContextForClient(ClientCustomDataSource contextDescription, Map<String, Object> data, Map<String, String[]> additionalProperties); boolean isMetadataSupported(ClientCustomDataSource clientCustomDataSource, String metadataClientType); @Override Object build(ClientCustomDataSource context, Map<String, String[]> options, Map<String, Object> contextData); @Override String getMetadataClientResourceType(ClientCustomDataSource connectionDescription); @Override Object build(ClientCustomDataSource context, PartialMetadataOptions options, Map<String, Object> contextData);  }### Answer:
@Test public void secureGetConnection_ignorablePropertiesAreRemoved(){ final String propertyToSecure = "propertyToSecure"; when(propertiesToIgnore.contains(propertyToSecure)).thenReturn(true); final ClientProperty clientPropertyToRemove = new ClientProperty(propertyToSecure, null); customDataSource.getProperties().add(clientPropertyToRemove); final ClientCustomDataSource result = strategy.getContextForClient(customDataSource, null, null); assertNotNull(result); assertTrue(customDataSource.getProperties().contains(clientPropertyToRemove)); final List<ClientProperty> properties = result.getProperties(); if(properties != null){ for (ClientProperty property : properties){ assertNotEquals(property.getKey(), propertyToSecure); } } }