static String[] maybeAddTls13(boolean enableTls13, String... defaultProtocols) {
        if (enableTls13) {
            String[] protocols = new String[defaultProtocols.length + 1];
            System.arraycopy(defaultProtocols, 0, protocols, 1, defaultProtocols.length);
            protocols[0] = "TLSv1.3";
            return protocols;
        } else {
            return defaultProtocols;
        }
    }
@Test
    void enableTls13() {
        String[] protos = ClientSslContextFactory.maybeAddTls13(true, "TLSv1.2");

        assertEquals(Arrays.asList("TLSv1.3", "TLSv1.2"), Arrays.asList(protos));
    }