@Test(timeout = 5000)
public void testReceiveObject() throws Exception {

    final TypedPublisher publisher = new TypedPublisher("test");
    publishingNode.addPublisher(publisher);
    publisher.waitForSubscribers(1);
    final String requestId = "requestId1";
    final String source = "source1";
    final String target = "target1";
    final String context = "context1";
    final String content = "content1";
    final String contentUrl = "contentUrl1";
    final LifeCycleEvents.PrepareRequest prepareRequest = LifeCycleEvents.PrepareRequest
            .newBuilder().setContent(content).setContentURL(contentUrl)
            .build();
    final LifeCycleEvents.LifeCycleRequest lifeCycleRequest = LifeCycleEvents.LifeCycleRequest
            .newBuilder()
            .setContext(context)
            .setExtension(LifeCycleEvents.PrepareRequest.request,
                    prepareRequest).build();
    final LifeCycleEvents.LifeCycleEvent event1 = LifeCycleEvents.LifeCycleEvent
            .newBuilder()
            .setType(LifeCycleEventType.PREPARE_REQUEST)
            .setRequestID(requestId)
            .setSource(source)
            .setTarget(target)
            .setExtension(LifeCycleEvents.LifeCycleRequest.request,
                    lifeCycleRequest).build();
    publisher.sendObject("LifeCycleEvent", event1);
    synchronized (lock) {
        lock.wait();
    }
    Assert.assertNotNull(receivedEvent);
    Assert.assertTrue(receivedEvent instanceof PrepareRequest);
}