@Test
public void unregisterTest() throws Exception {

    topicTestHelper();
    EventSource eventSourceMock = mock(EventSource.class);
    NodeId nodeId = new NodeId("nodeIdValue1");
    NodeKey nodeKey = new NodeKey(nodeId);
    Map<NodeKey, Registration> localMap = eventSourceTopology.getRoutedRpcRegistrations();
    NodeKey nodeKeyMock = mock(NodeKey.class);
    doReturn(nodeKeyMock).when(eventSourceMock).getSourceNodeKey();
    ObjectRegistration routedRpcRegistrationMock = mock(ObjectRegistration.class);
    localMap.put(nodeKeyMock, routedRpcRegistrationMock);
    eventSourceTopology.unRegister(eventSourceMock);
    verify(routedRpcRegistrationMock, times(1)).close();
}