public AdvancedNetworkConfig setEnabled(boolean enabled) {
        this.enabled = enabled;
        return this;
    }
@Test
    public void testFailFast_whenWanPublisherRequiresUndefinedEndpointConfig() {
        Config config = new Config();
        config.getAdvancedNetworkConfig().setEnabled(true);
        config.addWanReplicationConfig(
                new WanReplicationConfig()
                        .setName("seattle-tokyo")
                        .addBatchReplicationPublisherConfig(
                                new WanBatchPublisherConfig()
                                        .setClusterName("target-cluster")
                                        .setEndpoint("does-not-exist")));

        Assert.assertThrows(InvalidConfigurationException.class, () -> createHazelcastInstance(config));
    }