public void deregister(Operation operation) {
        Map<Long, Operation> operations = liveOperations.get(operation.getCallerAddress());

        if (operations == null) {
            throw new IllegalStateException("Missing address during de-registration of operation=" + operation);
        }

        if (operations.remove(operation.getCallId()) == null) {
            throw new IllegalStateException("Missing operation during de-registration of operation=" + operation);
        }
    }
@Test
    public void when_deregisterNotExistingAddress_then_fail() throws UnknownHostException {
        Operation op1 = createOperation("1.2.3.4", 1234, 2222L);
        assertThrows(IllegalStateException.class, () -> r.deregister(op1));
    }