public function testLinkEmailAttachmentToTargetEntityNotValid()
 {
     $file = $this->getMockBuilder('Oro\\Bundle\\AttachmentBundle\\Entity\\File')->setMethods(['getFilename'])->getMock();
     $countable = $this->getMockBuilder('Countable')->getMock();
     $countable->expects($this->never())->method('count')->will($this->returnValue(2));
     $this->configFileValidator->expects($this->never())->method('validate')->will($this->returnValue($countable));
     $emailAttachment = $this->getEmailAttachment();
     $this->emailAttachmentManager->method('buildAttachmentInstance')->withAnyParameters()->will($this->returnValue($this->attachment));
     $emailAttachment->expects($this->any())->method('getFile')->will($this->returnValue($file));
     $this->emailAttachmentManager->linkEmailAttachmentToTargetEntity($emailAttachment, new SomeEntity());
 }