Windows is very liberal with what is allowed for a hostname, it allows it to end with a `-`, contain `_` and even umlauts. If this is the case, the regex doesn't match the hostname and some of the tests fail:
RuntimeMXBean.getName() returned "6980@2b\u00e4d_f\u00f6r-u-".
Test failure: name did not match format <pid>@<hostname>: "6980@2b\u00e4d_f\u00f6r-u-"
RuntimeMXBean.getName() returned "2140@bad-hostname-".
Test failure: name did not match format <pid>@<hostname>: "2140@bad-hostname-"
RuntimeMXBean.getName() returned "6980@2b\u00e4d_f\u00f6r-u-".
Test failure: name did not match format <pid>@<hostname>: "6980@2b\u00e4d_f\u00f6r-u-"
RuntimeMXBean.getName() returned "2140@bad-hostname-".
Test failure: name did not match format <pid>@<hostname>: "2140@bad-hostname-"