@Test
public void testNamePatternEscapeMidToken() {

  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage(is("the token '%to%%ken%' (position 2 to 10) is unknown"));
  HeapDumpNameFormatter.validate("my%to%%ken%yolo");
}