@Rule
public ExpectedException exception = ExpectedException.none();
@Test
public void TestParse() throws ParseException {
Format format = new DefaultFormat();
format.setPattern("*");
assertEquals("balabala", format.parse("balabala"));
format.setPattern("id");
assertEquals("{id}", format.parse("balabala"));
format.setPattern("md5:2");
assertEquals("{md5:2}", format.parse("b2"));
exception.expect(ParseException.class);
format.parse("hello");
format.parse("Ad");
}