@Test
public void testScheduleNewPublishingEventWithStatusUpdate() throws Exception
{

    NodeRef firstNode = createContent("First");
    NodeRef secondNode = createContent("Second");
    
    List<String> statusChannels = Arrays.asList("test://channel/Channel1", "test://channel/Channel2", "test://channel/Channel3" );
    String message = "The message";
    PublishingDetails details = publishingService.createPublishingDetails()
        .setPublishChannelId(channelId)
        .addNodesToPublish(firstNode, secondNode)
        .setStatusMessage(message)
        .setStatusNodeToLinkTo(secondNode)
        .addStatusUpdateChannels(statusChannels);
    
    // Publish an event with the StatusUpdate
    String eventId = testHelper.scheduleEvent1Year(details);
    PublishingEvent event = publishingService.getPublishingEvent(eventId);
    StatusUpdate actualUpdate = event.getStatusUpdate();
    assertEquals(message, actualUpdate.getMessage());
    assertEquals(secondNode, actualUpdate.getNodeToLinkTo());
    Set<String> names = actualUpdate.getChannelIds();
    assertEquals(3, names.size());
    assertTrue(names.containsAll(statusChannels));
}