public String getMd5(String input) {
        byte[] md5;
        // MessageDigest instance is NOT thread-safe
        synchronized (mdInst) {
            mdInst.update(input.getBytes(UTF_8));
            md5 = mdInst.digest();
        }

        int j = md5.length;
        char str[] = new char[j * 2];
        int k = 0;
        for (int i = 0; i < j; i++) {
            byte byte0 = md5[i];
            str[k++] = hexDigits[byte0 >>> 4 & 0xf];
            str[k++] = hexDigits[byte0 & 0xf];
        }
        return new String(str);
    }
@Test
    void test() {
        MD5Utils sharedMd5Utils = new MD5Utils();
        final String[] input = {
            "provider-appgroup-one/org.apache.dubbo.config.spring.api.HelloService:dubboorg.apache.dubbo.config.spring.api.HelloService{REGISTRY_CLUSTER=registry-one, anyhost=true, application=provider-app, background=false, compiler=javassist, deprecated=false, dubbo=2.0.2, dynamic=true, file.cache=false, generic=false, group=group-one, interface=org.apache.dubbo.config.spring.api.HelloService, logger=slf4j, metadata-type=remote, methods=sayHello, organization=test, owner=com.test, release=, service-name-mapping=true, side=provider}",
            "provider-appgroup-two/org.apache.dubbo.config.spring.api.DemoService:dubboorg.apache.dubbo.config.spring.api.DemoService{REGISTRY_CLUSTER=registry-two, anyhost=true, application=provider-app, background=false, compiler=javassist, deprecated=false, dubbo=2.0.2, dynamic=true, file.cache=false, generic=false, group=group-two, interface=org.apache.dubbo.config.spring.api.DemoService, logger=slf4j, metadata-type=remote, methods=sayName,getBox, organization=test, owner=com.test, release=, service-name-mapping=true, side=provider}"
        };
        final String[] result = {sharedMd5Utils.getMd5(input[0]), new MD5Utils().getMd5(input[1])};

        System.out.println("Expected result: " + Arrays.asList(result));
        int nThreads = 8;
        CountDownLatch latch = new CountDownLatch(nThreads);
        List<Throwable> errors = Collections.synchronizedList(new ArrayList<>());
        ExecutorService executorService = Executors.newFixedThreadPool(nThreads);
        try {

            for (int i = 0; i < nThreads; i++) {
                MD5Utils md5Utils = i < nThreads / 2 ? sharedMd5Utils : new MD5Utils();
                executorService.submit(new Md5Task(input[i % 2], result[i % 2], md5Utils, latch, errors));
            }
            latch.await();
            Assertions.assertEquals(Collections.EMPTY_LIST, errors);
            Assertions.assertEquals(0, latch.getCount());
        } catch (Throwable e) {
            Assertions.fail(StringUtils.toString(e));
        } finally {
            executorService.shutdown();
        }
    }