I have an application that needs to be able to send mails on a button click. This all works fine. The mails need to be send by using a mailservice, I added this as a service agent.I also need to write tests for the application and here I have a bit of an issue.When I place the code from the business layer that calls the mailservice in comment, all the tests work (except for the mail test ofc... ) However when I remove it from command and just run my tests I get following error:\[quote\] Initialization method BusinessTests.FacadeTests.ItemServiceTests.RunBeforeAnyTests threw exception. System.ComponentModel.Composition.ImportCardinalityMismatchException: System.ComponentModel.Composition.ImportCardinalityMismatchException: No valid exports were found that match the constraint '((exportDefinition.ContractName == "Elia.InfoNCC.IBusiness.IItemBL") AndAlso (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") AndAlso "Elia.InfoNCC.IBusiness.IItemBL".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))', invalid exports may have been rejected..\[/quote\]The code from my businesslayer that calls the mailservice is a simple import and looks like this:\[code\][Import] private IMailSA MailSA { get; set; }\[/code\]If I place this line of in comment all is fine.. Else my tests fail but I need to be able to test everything ofc.. including mailing the items. Any ideas?