@Test
public void testParsing() throws Exception {
String str = "18000;duration=3600;tag=hyh8";
AvailabilityReader r = new AvailabilityReader(str);
Availability a = r.readValue();
assertEquals(18000, a.getDelay());
assertEquals(3600, a.getDuration());
assertNull(a.getComment());
assertEquals(1, a.getParameters().size());
Parameter parameter = a.getParameters().get(0);
assertEquals("tag", parameter.getName());
assertEquals("hyh8", parameter.getValue());
str = "120 (I'm in a meeting)";
r = new AvailabilityReader(str);
a = r.readValue();
assertEquals(120, a.getDelay());
assertEquals(0, a.getDuration());
assertEquals("I'm in a meeting", a.getComment());
assertEquals(0, a.getParameters().size());
}