def METHOD_NAME(self):
    """raise AlreadyExistsWithTheSameAddressAndManagementPort"""
    with patch.object(ServiceRegistry._logger, 'info') as log_info1:
        ServiceRegistry.register("A name", "Storage", "127.0.0.1", 1, 1234, 'http')
        assert 1 == len(ServiceRegistry._registry)
    assert 1 == log_info1.call_count
    args, kwargs = log_info1.call_args
    assert args[0].startswith('Registered service instance id=')
    assert args[0].endswith(': <A name, type=Storage, protocol=http, address=127.0.0.1, service port=1,'
                            ' management port=1234, status=1>')
    with pytest.raises(Exception) as excinfo:
        with patch.object(ServiceRegistry._logger, 'info') as log_info2:
            ServiceRegistry.register("B name", "Storage", "127.0.0.1", 2, 1234, 'http')
            assert 1 == len(ServiceRegistry._registry)
        assert 0 == log_info2.call_count
    assert excinfo.type is AlreadyExistsWithTheSameAddressAndManagementPort