@Test public void testParse() throws Exception { OperationsJsonParser parser = new OperationsJsonParser(); Operations actual = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/operations/valid.json")); assertThat( actual, is( new Operations( Collections.singleton( new OperationGroup( "opsbar-transitions", Collections.singleton( new OperationLink( "action_id_4", "issueaction-workflow-transition", "Start Progress", "Start work on the issue", "/secure/WorkflowUIDispatcher.jspa?id=93813&action=4&atl_token=", 10, null)), Collections.singleton( new OperationGroup( null, Collections.<OperationLink>emptyList(), Collections.<OperationGroup>emptyList(), new OperationHeader( "opsbar-transitions_more", "Workflow", null, null), null)), null, 20))))); }
@Test public void testParse() throws Exception { final SessionCookieJsonParser parser = new SessionCookieJsonParser(); assertEquals( new SessionCookie("JSESSIONID", "E5BD072ABEE0082DE4D6C8C2B6D96B79"), parser.parse(ResourceUtil.getJsonObjectFromResource("/json/sessionCookie/valid.json"))); }