public void GetAttachmentById_Test() { var controller = new AttachmentController(_unit); controller.Request = new HttpRequestMessage(); controller.Configuration = new HttpConfiguration(); var response = controller.GetAttachmentByID(69); AttachmentDTO attachment; Assert.IsNotNull(response); Assert.IsTrue(response.TryGetContentValue <AttachmentDTO>(out attachment)); }