public static SupportedVersionRange fromMap(Map<String, Short> versionRangeMap) {
        return new SupportedVersionRange(
            BaseVersionRange.valueOrThrow(MIN_VERSION_KEY_LABEL, versionRangeMap),
            BaseVersionRange.valueOrThrow(MAX_VERSION_KEY_LABEL, versionRangeMap));
    }
@Test
    public void testFromToMap() {
        SupportedVersionRange versionRange = new SupportedVersionRange((short) 1, (short) 2);
        assertEquals(1, versionRange.min());
        assertEquals(2, versionRange.max());

        Map<String, Short> versionRangeMap = versionRange.toMap();
        assertEquals(
            mkMap(mkEntry("min_version", versionRange.min()), mkEntry("max_version", versionRange.max())),
            versionRangeMap);

        SupportedVersionRange newVersionRange = SupportedVersionRange.fromMap(versionRangeMap);
        assertEquals(1, newVersionRange.min());
        assertEquals(2, newVersionRange.max());
        assertEquals(versionRange, newVersionRange);
    }