public boolean isSecurePortEnabled() {
        return server.getInstanceInfo().isPortEnabled(PortType.SECURE);
    }
@Test
    void securePortMustCheckInstanceInfo() {
        final InstanceInfo instanceInfo = Builder.newBuilder()
                .setAppName("secure-port")
                .setHostName("secure-port")
                .setPort(7777)
                .enablePort(PortType.SECURE, false)
                .build();
        final InstanceInfo secureEnabled = Builder.newBuilder()
                .setAppName("secure-port")
                .setHostName("secure-port")
                .setPort(7777)
                .enablePort(PortType.SECURE, true)
                .build();

        final DiscoveryEnabledServer server = new DiscoveryEnabledServer(instanceInfo, true);
        final DiscoveryEnabledServer secureServer = new DiscoveryEnabledServer(secureEnabled, true);
        final DynamicServerListLoadBalancer<Server> lb =
                new DynamicServerListLoadBalancer<>(new DefaultClientConfigImpl());

        final DiscoveryResult result = new DiscoveryResult(server, lb.getLoadBalancerStats());
        final DiscoveryResult secure = new DiscoveryResult(secureServer, lb.getLoadBalancerStats());

        Truth.assertThat(result.isSecurePortEnabled()).isFalse();
        Truth.assertThat(secure.isSecurePortEnabled()).isTrue();
    }