@Test
public void testParse() throws Exception {

    final WorklogJsonParser parser = new WorklogJsonParser();
    final Worklog worklog = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/worklog/valid.json"));
    assertEquals(toUri("http://localhost:8090/jira/rest/api/latest/worklog/10010"), worklog.getSelf());
    assertEquals(toUri("http://localhost:8090/jira/rest/api/latest/issue/TST-2"), worklog.getIssueUri());
    assertEquals(TestConstants.USER_ADMIN, worklog.getAuthor());
    assertEquals(TestConstants.USER_ADMIN, worklog.getUpdateAuthor());
    assertEquals("my first work", worklog.getComment());
    assertEquals(TestUtil.toDateTime("2010-08-17T16:35:47.466+0200"), worklog.getCreationDate());
    assertEquals(TestUtil.toDateTime("2010-08-17T16:35:47.466+0200"), worklog.getUpdateDate());
    assertEquals(TestUtil.toDateTime("2010-08-15T16:35:00.000+0200"), worklog.getStartDate());
    assertEquals(60, worklog.getMinutesSpent());
    Assert.assertNull(worklog.getVisibility());
}