@Test
void enabledSecure() throws IOException {

    Path installDir = Files.createTempDirectory("robozonky-install");
    Path props = installDir.resolve("management.properties");
    PropertyConfiguration configuration = PropertyConfiguration.enabledJmx("localhost", 7091, true);
    configuration.accept(null, installDir);
    assertThat(load(props)).containsOnly(
            Map.entry("com.sun.management.jmxremote.authenticate", "true"),
            Map.entry("com.sun.management.jmxremote.ssl", "false"),
            Map.entry("com.sun.management.jmxremote.rmi.port", "7091"),
            Map.entry("com.sun.management.jmxremote.port", "7091"));
    assertThat(configuration.getProperties()).containsOnly(
            Map.entry("com.sun.management.config.file", props.toString()),
            Map.entry("com.sun.management.jmxremote", "true"),
            Map.entry("java.rmi.server.hostname", "localhost"),
            Map.entry("jmx.remote.x.notification.buffer.size", "10"));
}