public void SendAndReciverMensageObjectNotConvert() { Task.Run(async() => { var test1 = new KeyValuePair <int, int>(0, 1); var test2 = new Version(1, 0, 0); var result = default(Version); using var mqtt = new MqttService(_configuration); await mqtt.ConnectionStartAsync(); var value = mqtt.GetConnectionStatus(); Assert.Equal(IBusService.ConnectionStatus.Connected, value); mqtt.OnObjectReciver <Version>((o) => { Assert.Equal(test2, o); }); mqtt.SendObject(test1); await Task.Delay(2000); Assert.Null(result); mqtt.SendObject(test2); await Task.Delay(2000); }).GetAwaiter().GetResult(); }