@Test
public void testDecorating() throws Exception
{
PrettyTime t = new PrettyTime();
TimeFormat format = new SimpleTimeFormat().setFutureSuffix("from now").setPastSuffix("ago");
Duration duration = t.approximateDuration(new Date(System.currentTimeMillis() + 1000));
assertEquals("some time from now", format.decorate(duration, "some time"));
duration = t.approximateDuration(new Date(System.currentTimeMillis() - 10000));
assertEquals("some time ago", format.decorate(duration, "some time"));
}