/**
  * Test that initization with the fromReflectionMethod() method
  * and an empty annotation works as expected.
  *
  * @return void
  */
 public function testFromReflectionMethodAndAnnotationWithoutAttributes()
 {
     // prepare the empty annotation values
     $values = array();
     // create a mock annotation implementation
     $beanAnnotation = $this->getMockBuilder('AppserverIo\\Psr\\EnterpriseBeans\\Annotations\\EnterpriseBean')->setConstructorArgs(array('EnterpriseBean', $values))->getMockForAbstractClass();
     // create a mock annotation
     $annotation = $this->getMockBuilder('AppserverIo\\Lang\\Reflection\\ReflectionAnnotation')->setMethods(array('getAnnotationName', 'getValues', 'newInstance'))->setConstructorArgs(array('EnterpriseBean', $values))->getMock();
     // mock the ReflectionAnnotation methods
     $annotation->expects($this->once())->method('getAnnotationName')->will($this->returnValue('EnterpriseBean'));
     $annotation->expects($this->once())->method('getValues')->will($this->returnValue($values));
     $annotation->expects($this->once())->method('newInstance')->will($this->returnValue($beanAnnotation));
     // initialize the annotation aliases
     $aliases = array(EnterpriseBean::ANNOTATION => EnterpriseBean::__getClass());
     // initialize the reflection method
     $reflectionMethod = $this->getMockBuilder('AppserverIo\\Lang\\Reflection\\ReflectionMethod')->setConstructorArgs(array(__CLASS__, array(), $aliases))->setMethods(array('hasAnnotation', 'getAnnotation', 'getClassName', 'getMethodName'))->getMock();
     // mock the methods
     $reflectionMethod->expects($this->once())->method('hasAnnotation')->with(EnterpriseBean::ANNOTATION)->will($this->returnValue(true));
     $reflectionMethod->expects($this->once())->method('getAnnotation')->with(EnterpriseBean::ANNOTATION)->will($this->returnValue($annotation));
     $reflectionMethod->expects($this->exactly(2))->method('getClassName')->will($this->returnValue(__CLASS__));
     $reflectionMethod->expects($this->exactly(2))->method('getMethodName')->will($this->returnValue('injectDummyEnterpriseBean'));
     // initialize the descriptor from the reflection method
     $this->descriptor->fromReflectionMethod($reflectionMethod);
     // check that the descriptor has been initialized successfully
     $this->assertSame('env/DummyEnterpriseBean', $this->descriptor->getName());
     $this->assertSame('DummyEnterpriseBeanLocal', $this->descriptor->getBeanInterface());
     $this->assertSame('DummyEnterpriseBean', $this->descriptor->getBeanName());
     $this->assertNull($this->descriptor->getDescription());
     $this->assertNull($this->descriptor->getLookup());
 }