@Override
    @Nonnull
    public <T extends DataConnection> T getAndRetainDataConnection(String name, Class<T> clazz) {
        DataConnectionEntry dataConnection = dataConnections.computeIfPresent(name, (k, v) -> {
            if (!clazz.isInstance(v.instance)) {
                throw new HazelcastException("Data connection '" + name + "' must be an instance of " + clazz);
            }
            v.instance.retain();
            return v;
        });

        if (dataConnection == null) {
            throw new HazelcastException("Data connection '" + name + "' not found");
        }
        //noinspection unchecked
        return (T) dataConnection.instance;
    }
@Test
    public void should_return_true_when_config_data_connection_exists() {
        DataConnection dataConnection = dataConnectionService.getAndRetainDataConnection(TEST_CONFIG, DataConnection.class);
        assertThat(dataConnection)
                .describedAs("DataConnection created via config should exist")
                .isNotNull();
    }