@@ -0,0 +1,1507 @@
+package com.bugsnag;%0A%0Aimport com.fasterxml.jackson.databind.JsonNode;%0Aimport com.fasterxml.jackson.databind.ObjectMapper;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class NotificationTest %7B%0A%0A    private JsonNode rootNode;%0A%0A    @Before%0A    public void setUp() throws Throwable %7B%0A        ObjectMapper mapper = new ObjectMapper();%0A        Configuration config = new Configuration(%22api-key%22);%0A        Report report = new Report(config, new RuntimeException());%0A        Notification notification = new Notification(config, report);%0A        String json = mapper.writeValueAsString(notification);%0A        rootNode = mapper.readTree(json);%0A    %7D%0A%0A    @Test%0A    public void testJsonSerialisation() throws Throwable %7B%0A        assertNotNull(rootNode);%0A        assertNotNull(rootNode.get(%22apiKey%22).asText());%0A        assertNotNull(rootNode.get(%22notifier%22));%0A%0A        JsonNode events = rootNode.get(%22events%22);%0A        assertNotNull(events);%0A%0A        JsonNode event = events.get(0);%0A        assertNotNull(event);%0A%0A        // check contains a session%0A        JsonNode session = event.get(%22session%22);%0A        assertNotNull(session);%0A%0A        assertNotNull(session.get(%22id%22).asText());%0A        assertNotNull(session.get(%22startedAt%22).asText());%0A%0A        JsonNode handledState = session.get(%22events%22);%0A        assertNotNull(handledState);%0A        assertNotNull(handledState.get(%22handled%22));%0A        assertNotNull(handledState.get(%22unhandled%22));%0A    %7D%0A%0A%7D

add test for error report payload session serialisation