@Test
    public void testStartEnd() throws Exception {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.SECOND, 0);
        calendar.roll(Calendar.HOUR, false);
        timeTracker.startFrom(calendar.getTime(), "Start a test log.");

        WorklogEntry worklogEntry = timeTracker.current();
        Assert.assertEquals("Start a test log.", worklogEntry.getMessage());

        try {
            timeTracker.startFrom(new Date(calendar.getTimeInMillis() + 20000), "Start a test log, again");
            Assert.fail("Don't thronw TimeTrackerException.");
        } catch (TimeTrackerException e) {
        }

        timeTracker.end(new Date(), "Start a test log and end to.");
        worklogEntry = timeTracker.findById(calendar.getTimeInMillis());

        Assert.assertEquals("Start a test log and end to.", worklogEntry.getMessage());
    }