@Nonnull
    public HazelcastInstance getClient() {
        if (getConfig().isShared()) {
            retain();
            return proxy.get();
        } else {
            return HazelcastClient.newHazelcastClient(clientConfig);
        }
    }
@Test
    public void shared_client_from_file_should_return_same_instance() {
        DataConnectionConfig dataConnectionConfig = sharedDataConnectionConfigFromFile(clusterName);
        hazelcastDataConnection = new HazelcastDataConnection(dataConnectionConfig);
        HazelcastInstance c1 = hazelcastDataConnection.getClient();
        HazelcastInstance c2 = hazelcastDataConnection.getClient();

        try {
            assertThat(c1).isSameAs(c2);
        } finally {
            c1.shutdown();
            c2.shutdown();
            // Delete the file at the end of the test
            try {
                String filePath = dataConnectionConfig.getProperty(HazelcastDataConnection.CLIENT_XML_PATH);
                assert filePath != null;
                Files.delete(Paths.get(filePath));
            } catch (IOException ignored) {
            }
        }
    }