public void Get() { IHelloWorldBO helloWorldBO = new HelloWorldBO(); // controller instance HelloWorldController controller = new HelloWorldController(helloWorldBO); // call ReturnHelloWorld() method IHttpActionResult actionResult = controller.ReturnHelloWorld(); // validate test var conNegResult = actionResult as OkNegotiatedContentResult <string>; Assert.IsNotNull(conNegResult); Assert.AreEqual("Hello World", conNegResult.Content); }