@NotNull @Override
    public Optional<? extends Algorithm> parse(
            @Nullable String str, @NotNull DetectionLocation detectionLocation) {
        if (str == null) {
            return Optional.empty();
        }

        return switch (str) {
            case "DHE", "DH" -> Optional.of(new DH(KeyAgreement.class, detectionLocation));
            case "SRP" -> Optional.of(new SRP(detectionLocation));
            case "RSA" -> Optional.of(new RSA(KeyAgreement.class, detectionLocation));
            case "ECDH", "ECDHE" -> Optional.of(new ECDH(detectionLocation));
            case "ECCPWD" -> Optional.of(new ECCPWD(detectionLocation));
            case "PSK" -> Optional.of(new PSK(detectionLocation));
            case "KRB5" -> Optional.of(new Kerberos(5, detectionLocation));
            case "GOSTR341112" -> Optional.of(new GOSTR341112(detectionLocation));
            case "GOSTR341112 256" -> Optional.of(new GOSTR341112(256, detectionLocation));
            default -> Optional.empty();
        };
    }
@Test
    public void test() {
        final DetectionLocation testDetectionLocation =
                new DetectionLocation("testfile", 1, 1, List.of("test"), () -> "SSL");

        final KeyExchangeAlgorithmMapper mapper = new KeyExchangeAlgorithmMapper();
        final Collection<String> kexCollection =
                JsonCipherSuites.CIPHER_SUITES.values().stream()
                        .map(JsonCipherSuite::getKexAlgorithm)
                        .filter(Optional::isPresent)
                        .map(Optional::get)
                        .collect(Collectors.toSet());

        for (String kex : kexCollection) {
            if (Objects.equals(kex, "NULL")) {
                continue;
            }

            try {
                assertThat(mapper.parse(kex, testDetectionLocation)).isPresent();
            } catch (AssertionError e) {
                System.out.println("Can't map '" + kex + "'");
                throw e;
            }
        }
    }