{
PrettyTime t = new PrettyTime(new Date(1000 * 60 * 60 * 3 + 1000 * 60 * 45));
Duration duration = t.approximateDuration(new Date(0));
assertEquals("4 hours ago", t.format(duration));
assertEquals("3 hours ago", t.formatUnrounded(duration));
}
@Test
public void testDecorating() throws Exception
{