@Test
public void testNamePatternCountingPercentTokens() {

  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage(
      is("the token starter character '%' at position 13 does not have a matching token closer "
          + "'%' character"));
  HeapDumpNameFormatter.validate("a%host_name%c%");
}