@Test
public void testNamePatternTimestampFormattingWithEscape() {

  final HeapDumpNameFormatter subject =
      new HeapDumpNameFormatter("hda_%host_name%_%ts:yyyy'%%'MM'%%'dd%_%uuid%.hprof",
          "my_host", uuidProvider);
  assertThat(subject.format(date),
      is("hda_my_host_1970%01%01_19866c22-ce15-41de-807b-4805d0387d76.hprof"));
}