void writeConfigToDisk() {
        VespaTlsConfig config = VespaZookeeperTlsContextUtils.tlsContext()
                                                             .map(ctx -> new VespaTlsConfig(ctx, TransportSecurityUtils.getInsecureMixedMode()))
                                                             .orElse(VespaTlsConfig.tlsDisabled());
        writeConfigToDisk(config);
    }
@Test
    public void jute_max_buffer_can_be_set() throws IOException {
        ZookeeperServerConfig.Builder builder = new ZookeeperServerConfig.Builder();
        builder.myid(0);
        File idFile = folder.newFile();
        File cfgFile = folder.newFile();

        builder.server(new ZookeeperServerConfig.Server.Builder().id(0).hostname("testhost"));
        builder.zooKeeperConfigFile(cfgFile.getAbsolutePath());
        builder.myidFile(idFile.getAbsolutePath());

        new Configurator(builder.build()).writeConfigToDisk(VespaTlsConfig.tlsDisabled());
        assertEquals("" + new ZookeeperServerConfig(builder).juteMaxBuffer(), System.getProperty(ZOOKEEPER_JUTE_MAX_BUFFER));

        final int max_buffer = 1;
        builder.juteMaxBuffer(max_buffer);
        new Configurator(builder.build()).writeConfigToDisk(VespaTlsConfig.tlsDisabled());
        assertEquals("" + max_buffer, System.getProperty(ZOOKEEPER_JUTE_MAX_BUFFER));
    }