public static long getPid() {
        return ProcessHandle.current().pid();
    }
@Test
    public void testGetPid() {
       long legacyPidResult = getPidLegacy();

       assumeThat(legacyPidResult).isNotEqualTo(-1);
       assertEquals(legacyPidResult, JVMUtil.getPid());
    }