package org.jboss.webbeans.test.unit.implementation;

import org.jboss.webbeans.bean.EnterpriseBean;
import org.jboss.webbeans.test.unit.AbstractEjbEmbeddableTest;
import org.testng.annotations.Test;

public class RemoveMethodTests extends AbstractEjbEmbeddableTest
{

   /**
    * If the application directly calls an EJB remove method of an instance of a
    * session bean that is a stateful session bean and declares any scope other
    * than @Dependent, an UnsupportedOperationException is thrown.
    */
   @Test(groups = { "enterprisebean", "removemethod", "lifecycle", "stub" })
   public void testApplicationCalledRemoveMethodOfStatefulSessionBeanWithNonDependentScopeFails()
   {
      assert false;
   }

   /**
    * If the application directly calls an EJB remove method of an instance of a
    * session bean that is a stateful session bean and has scope @Dependent then
    * no parameters are passed to the method by the container.
    */
   @Test(groups = { "enterprisebean", "removemethod", "lifecycle", "stub" })
   public void testApplicationCalledRemoveMethodOfStatefulSessionBeanWithDependentScopeHasNoInjectedParameters()
   {
      addToEjbCache(Bad.class);
      addToEjbCache(BadLocal.class);
      EnterpriseBean<Bad> bean = EnterpriseBean.of(Bad.class, manager);
      manager.addBean(bean);
      EnterpriseBean<BadLocal> lbean = EnterpriseBean.of(BadLocal.class, manager);
      manager.addBean(lbean);
      BadLocal x = manager.getInstance(bean);
      x.bye();
   }

   /**
    * Furthermore, the container ignores the instance instead of destroying it
    * when Bean.destroy() is called, as defined in Section 6.5, Lifecycle of
    * stateful session beans.
    */
   @Test(groups = { "enterprisebean", "removemethod", "lifecycle", "stub" })
   public void testApplicationCalledRemoveMethodOfStatefulSessionBeanWithDependentScopeIsIgnoredWhenDestroyed()
   {
      assert false;
   }

}

@@ -79,87 +79,26 @@
 ans.
-bean.EnterpriseBean;%0D%0Aimport org.jboss.webbeans.test.unit.AbstractEjbEmbeddable
+tck.tests.Abstract
 Test
@@ -190,21 +190,8 @@
 ract
-EjbEmbeddable
 Test
@@ -1100,37 +1100,35 @@
    %7B%0D%0A      
-addToEjbCache
+deployBeans
 (Bad.class);
@@ -1139,301 +1139,61 @@
     
-addToEjbCache(BadLocal.class);%0D%0A      EnterpriseBean%3CBad%3E bean = EnterpriseBean.of(Bad.class, manager);%0D%0A      manager.addBean(bean);%0D%0A      EnterpriseBean%3CBadLocal%3E lbean = EnterpriseBean.of(BadLocal.class, manager);%0D%0A      manager.addBean(lbean);%0D%0A      BadLocal x = manager.getInstance(bean
+BadLocal x = manager.getInstanceByType(BadLocal.class
 );%0D%0A

Fix build