MessageIdUtil { public static boolean verify(String identifier) { return PATTERN.matcher(identifier).matches(); }  static boolean verify(String identifier);  }
@Test public void simple() { Assert.assertTrue(MessageIdUtil.verify("<1060501332.515.1528302064500@de77cf5d0088>")); Assert.assertTrue(MessageIdUtil.verify("<OpenPEPPOL-06062018160101+0300-0447@APP_1000000200_APP_2000000300>")); Assert.assertFalse(MessageIdUtil.verify("<1060501332..515.1528302064500@de77cf5d0088>")); Assert.assertFalse(MessageIdUtil.verify(" <1060501332.515.1528302064500@de77cf5d0088>")); Assert.assertFalse(MessageIdUtil.verify("<1060501332.515.1528302064500@de77cf5d0088")); Assert.assertFalse(MessageIdUtil.verify("<1060501332.515.1528302064500_de77cf5d0088>")); Assert.assertTrue(MessageIdUtil.verify("<Aa1!#$%&'*+-/=?^_`{|}~.Aa1!#$%&'*+-/=?^_`{|}~@Aa1!#$%&'*+-/=?^_`{|}~.Aa1!#$%&'*+-/=?^_`{|}~>")); }