test_class.file: decorator/src/test/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorBundleListenerTest.java
test_class.identifier: ServiceDecoratorBundleListenerTest
test_case.body: @Test
      public void testBundleListener() {
          BundleContext bc = EasyMock.createMock(BundleContext.class);
          EasyMock.replay(bc);
  
          final List<String> called = new ArrayList<>();
          ServiceDecoratorImpl serviceDecorator = new ServiceDecoratorImpl() {
              @Override
              void addDecorations(Bundle bundle) {
                  called.add("addDecorations");
              }
  
              @Override
              void removeDecorations(Bundle bundle) {
                  called.add("removeDecorations");
              }
          };
  
          Bundle b = EasyMock.createMock(Bundle.class);
          EasyMock.replay(b);
  
          ServiceDecoratorBundleListener listener = new ServiceDecoratorBundleListener(serviceDecorator);
  
          assertEquals("Precondition failed", 0, called.size());
          listener.bundleChanged(new BundleEvent(BundleEvent.INSTALLED, b));
          assertEquals(0, called.size());
  
          listener.bundleChanged(new BundleEvent(BundleEvent.STARTED, b));
          assertEquals(Arrays.asList("addDecorations"), called);
  
          listener.bundleChanged(new BundleEvent(BundleEvent.STOPPING, b));
          assertEquals(Arrays.asList("addDecorations", "removeDecorations"), called);
  
      }
test_case.class_method_signature: ServiceDecoratorBundleListenerTest.testBundleListener()
test_case.full_signature: @Test public void testBundleListener()
test_case.identifier: testBundleListener
test_case.invocations: createMock replay add add createMock replay assertEquals size bundleChanged assertEquals size bundleChanged assertEquals asList bundleChanged assertEquals asList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBundleListener()
focal_class.declarator: serviceDecorator
focal_class.modifier: private final
focal_class.original_string: private final ServiceDecoratorImpl serviceDecorator;
focal_class.type: ServiceDecoratorImpl
focal_class.var_name: serviceDecorator
focal_class.file: decorator/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorBundleListener.java
focal_class.identifier: ServiceDecoratorBundleListener
focal_class.interfaces: implements BundleListener
focal_class.class_method_signature: ServiceDecoratorBundleListener.ServiceDecoratorBundleListener(ServiceDecoratorImpl serviceDecorator)
focal_class.full_signature: public  ServiceDecoratorBundleListener(ServiceDecoratorImpl serviceDecorator)
focal_class.identifier: ServiceDecoratorBundleListener
focal_class.modifiers: public
focal_class.parameters: (ServiceDecoratorImpl serviceDecorator)
focal_class.signature:  ServiceDecoratorBundleListener(ServiceDecoratorImpl serviceDecorator)
focal_class.class_method_signature: ServiceDecoratorBundleListener.bundleChanged(BundleEvent be)
focal_class.full_signature: @Override public void bundleChanged(BundleEvent be)
focal_class.identifier: bundleChanged
focal_class.modifiers: @Override public
focal_class.parameters: (BundleEvent be)
focal_class.return: void
focal_class.signature: void bundleChanged(BundleEvent be)
focal_method.body: @Override
      public void bundleChanged(BundleEvent be) {
          switch(be.getType()) {
          case BundleEvent.STARTED:
              this.serviceDecorator.addDecorations(be.getBundle());
              break;
          case BundleEvent.STOPPING:
              this.serviceDecorator.removeDecorations(be.getBundle());
              break;
          default:
          }
      }
focal_method.class_method_signature: ServiceDecoratorBundleListener.bundleChanged(BundleEvent be)
focal_method.full_signature: @Override public void bundleChanged(BundleEvent be)
focal_method.identifier: bundleChanged
focal_method.invocations: getType addDecorations getBundle removeDecorations getBundle
focal_method.modifiers: @Override public
focal_method.parameters: (BundleEvent be)
focal_method.return: void
focal_method.signature: void bundleChanged(BundleEvent be)