@Test
public void testNamePatternEnvironmentEmptyConfiguration() {

  expectedException.expect(IllegalArgumentException.class);
  expectedException.expectMessage(is("the token '%env:%' (position 4 to 9) has invalid "
      + "configuration: it requires configuration, but none is provided"));
  HeapDumpNameFormatter.validate("hda_%env:%.hprof");
}