@Test
public void testParseWithRoleLevel() throws Exception {

    final WorklogJsonParser parser = new WorklogJsonParser();
    final Worklog worklog = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/worklog/valid-roleLevel.json"));
    assertEquals(toUri("http://localhost:8090/jira/rest/api/latest/worklog/10011"), worklog.getSelf());
    assertEquals(toUri("http://localhost:8090/jira/rest/api/latest/issue/TST-2"), worklog.getIssueUri());
    assertEquals(TestConstants.USER1, worklog.getAuthor());
    assertEquals(TestConstants.USER1, worklog.getUpdateAuthor());
    assertEquals("another piece of work", worklog.getComment());
    assertEquals(TestUtil.toDateTime("2010-08-17T16:38:00.013+0200"), worklog.getCreationDate());
    assertEquals(TestUtil.toDateTime("2010-08-17T16:38:24.948+0200"), worklog.getUpdateDate());
    assertEquals(TestUtil.toDateTime("2010-08-17T16:37:00.000+0200"), worklog.getStartDate());
    assertEquals(Visibility.role("Developers"), worklog.getVisibility());
    assertEquals(15, worklog.getMinutesSpent());
}