@Test
public void registerTest() throws Exception {

    topicTestHelper();
    Node nodeMock = mock(Node.class);
    EventSource eventSourceMock = mock(EventSource.class);
    NodeId nodeId = new NodeId("nodeIdValue1");
    NodeKey nodeKey = new NodeKey(nodeId);
    doReturn(nodeKey).when(nodeMock).key();
    doReturn(nodeKey).when(eventSourceMock).getSourceNodeKey();
    ObjectRegistration routedRpcRegistrationMock = mock(ObjectRegistration.class);
    doReturn(routedRpcRegistrationMock).when(rpcProviderRegistryMock).registerRpcImplementation(
        eq(EventSourceService.class), eq(eventSourceMock), any(Set.class));
    eventSourceTopology.register(eventSourceMock);
    verify(rpcProviderRegistryMock, times(1)).registerRpcImplementation(eq(EventSourceService.class),
        eq(eventSourceMock), any(Set.class));
}