public void ToMessageWithNonMatchingDataType()
        {
            var translator = new DownloadRequestConverter();

            var data = new SuccessData
            {
                Id           = new MessageId(),
                InResponseTo = new MessageId(),
                Sender       = new EndpointId("a"),
            };
            var msg = translator.ToMessage(data);

            Assert.IsInstanceOf(typeof(UnknownMessageTypeMessage), msg);
            Assert.AreSame(data.Id, msg.Id);
            Assert.AreSame(data.Sender, msg.Sender);
            Assert.AreSame(data.InResponseTo, msg.InResponseTo);
        }
        public void ToMessage()
        {
            var translator = new DownloadRequestConverter();

            var data = new DownloadRequestData
            {
                Id           = new MessageId(),
                InResponseTo = new MessageId(),
                Sender       = new EndpointId("a"),
                Token        = new UploadToken(),
            };
            var msg = translator.ToMessage(data);

            Assert.IsInstanceOf(typeof(DataDownloadRequestMessage), msg);
            Assert.AreSame(data.Id, msg.Id);
            Assert.AreSame(data.Sender, msg.Sender);
            Assert.AreSame(data.Token, ((DataDownloadRequestMessage)msg).Token);
        }