class VersionParser {

    @VisibleForTesting
    Version parse(String version) {
        Preconditions.checkNotNull(version);

        return supportedVersions.stream()
            .filter(jmapVersion -> jmapVersion.asString().equalsIgnoreCase(version))
            .findFirst()
            .orElseThrow(() -> new IllegalArgumentException(version + " is not a supported version"));
    }

    @Inject public  VersionParser(Set<Version> supportedVersions);

}