public static int compareVersion(final String versionA, final String versionB) {
        final String[] sA = versionA.split("\\.");
        final String[] sB = versionB.split("\\.");
        int expectSize = 3;
        if (sA.length != expectSize || sB.length != expectSize) {
            throw new IllegalArgumentException("version must be like x.y.z(-beta)");
        }
        int first = Objects.compare(sA[0], sB[0], STRING_COMPARATOR);
        if (first != 0) {
            return first;
        }
        int second = Objects.compare(sA[1], sB[1], STRING_COMPARATOR);
        if (second != 0) {
            return second;
        }
        return Objects.compare(sA[2].split("-")[0], sB[2].split("-")[0], STRING_COMPARATOR);
    }
@Test
    void testVersionCompareLt() {
        assertTrue(VersionUtils.compareVersion("1.2.0", "1.2.1") < 0);
        assertTrue(VersionUtils.compareVersion("0.2.0", "1.2.0") < 0);
        assertTrue(VersionUtils.compareVersion("1.2.0", "1.3.0") < 0);
    }