public void register(Operation operation) {
        Map<Long, Operation> callIds = liveOperations.computeIfAbsent(operation.getCallerAddress(),
                (key) -> new ConcurrentHashMap<>());
        if (callIds.putIfAbsent(operation.getCallId(), operation) != null) {
            throw new IllegalStateException("Duplicate operation during registration of operation=" + operation);
        }
    }
@Test
    public void when_registerDuplicateCallId_then_exception() throws UnknownHostException {
        AsyncJobOperation operation = createOperation("1.2.3.4", 1234, 2222L);
        r.register(operation);

        // this should not fail
        r.register(createOperation("1.2.3.4", 1234, 2223L));

        // adding a duplicate, expecting failure
        assertThrows(IllegalStateException.class, () -> r.register(operation));
    }