public void VoidAsync() { var handler = CreateClass("MyService", "VoidAsync")(null); var task = new Task(() => { }); task.Start(); service.VoidAsync().Returns(task); var resultingTask = handler.Handle(service, null, 0); Assert.That(resultingTask.Result, Is.EqualTo(new byte[0])); }