public void TestLoginUserServiceReadInvalidOperationException()
        {
            long      id   = 1;
            LoginUser user = new LoginUser()
            {
                IsActivated = true,
                IsAdmin     = false,
                UserInfo    = new UserInfo()
                {
                    Email = "*****@*****.**"
                },
                PasswordHash = new byte[] { 1, 2, 3 },
                PasswordSalt = new byte[] { 1, 2, 3 },
                Id           = 1
            };

            LoginUser wrongUser = new LoginUser()
            {
                IsActivated = true,
                IsAdmin     = false,
                UserInfo    = new UserInfo()
                {
                    Email = "*****@*****.**"
                },
                PasswordHash = new byte[] { 1, 2, 3 },
                PasswordSalt = new byte[] { 1, 2, 3 },
                Id           = 2
            };
            LoginUser userNull = null;

            _mockRepo.Setup(repo => repo.Read(id)).Returns(user);

            Assert.IsTrue(_service.Read(id).Id == id);

            _mockRepo.Verify(x => x.Read(id), Times.Once);

            _mockRepo.Setup(repo => repo.Read(id)).Returns(wrongUser);

            Assert.ThrowsException <InvalidOperationException>(() => _service.Read(id));

            _mockRepo.Setup(repo => repo.Read(id)).Returns(userNull);

            Assert.ThrowsException <InvalidDataException>(() => _service.Read(id));
        }