FELIX-2010 Testcases ensuring various visibility and argument options for the activate method are respected for DS 1.1 components.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@903585 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/ActivateSignatureTest.java b/scr/src/test/java/org/apache/felix/scr/integration/ActivateSignatureTest.java
new file mode 100644
index 0000000..2f6c623
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/ActivateSignatureTest.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration;
+
+
+import junit.framework.TestCase;
+
+import org.apache.felix.scr.Component;
+import org.apache.felix.scr.integration.components.activatesignature.AbstractActivateSignatureTestComponent;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+
+
+/**
+ * The <code>ActivateSignatureTest</code> tests various DS 1.1 activation
+ * signatures for the default method name
+ */
+@RunWith(JUnit4TestRunner.class)
+public class ActivateSignatureTest extends ComponentTestBase
+{
+
+    static
+    {
+        // use different components
+        descriptorFile = "/integration_test_signature_components.xml";
+
+        // uncomment to enable debugging of this test class
+        // paxRunnerVmOption = DEBUG_VM_OPTION;
+    }
+
+
+    @Test
+    public void test()
+    {
+        // wait for components to fire up in the background....
+        delay();
+
+        final Component[] components = getComponents();
+        TestCase.assertNotNull( components );
+
+        for ( Component component : components )
+        {
+            TestCase.assertTrue( "Expecting component " + component.getName() + " to be enabled", component
+                .isDefaultEnabled() );
+
+            TestCase.assertEquals( "Expecting component " + component.getName() + " to be active",
+                Component.STATE_ACTIVE, component.getState() );
+
+            final Object instance = component.getComponentInstance().getInstance();
+            TestCase.assertTrue( "Expecting component " + component.getName()
+                + " to be an AbstractActivateSignatureTestComponent",
+                instance instanceof AbstractActivateSignatureTestComponent );
+
+            final AbstractActivateSignatureTestComponent aastc = ( AbstractActivateSignatureTestComponent ) instance;
+            TestCase.assertEquals( "Expect activate method to be called", component.getName(), aastc.getMethodCalled() );
+        }
+    }
+
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java b/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
index 5ef14af..4126d23 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
@@ -148,20 +148,28 @@
     }
 
 
-    protected Component findComponentByName( String name )
+    protected Component[] getComponents()
     {
         ScrService scr = ( ScrService ) scrTracker.getService();
         if ( scr != null )
         {
-            Component[] components = scr.getComponents();
-            if ( components != null )
+            return scr.getComponents();
+        }
+
+        return null;
+    }
+
+
+    protected Component findComponentByName( String name )
+    {
+        Component[] components = getComponents();
+        if ( components != null )
+        {
+            for ( Component component : components )
             {
-                for ( Component component : components )
+                if ( name.equals( component.getName() ) )
                 {
-                    if ( name.equals( component.getName() ) )
-                    {
-                        return component;
-                    }
+                    return component;
                 }
             }
         }
@@ -172,26 +180,22 @@
 
     protected Component[] findComponentsByName( String name )
     {
-        ScrService scr = ( ScrService ) scrTracker.getService();
-        if ( scr != null )
+        List<Component> cList = new ArrayList<Component>();
+        Component[] components = getComponents();
+        if ( components != null )
         {
-            List<Component> cList = new ArrayList<Component>();
-            Component[] components = scr.getComponents();
-            if ( components != null )
+            for ( Component component : components )
             {
-                for ( Component component : components )
+                if ( name.equals( component.getName() ) )
                 {
-                    if ( name.equals( component.getName() ) )
-                    {
-                        cList.add( component );
-                    }
+                    cList.add( component );
                 }
             }
+        }
 
-            if ( !cList.isEmpty() )
-            {
-                return cList.toArray( new Component[cList.size()] );
-            }
+        if ( !cList.isEmpty() )
+        {
+            return cList.toArray( new Component[cList.size()] );
         }
 
         return null;
@@ -342,7 +346,8 @@
                 withBnd()
                 .set( Constants.BUNDLE_SYMBOLICNAME, "simplecomponent" )
                 .set( Constants.BUNDLE_VERSION, "0.0.11" )
-                .set( Constants.IMPORT_PACKAGE, "org.apache.felix.scr.integration.components" )
+                .set( Constants.IMPORT_PACKAGE,
+                    "org.apache.felix.scr.integration.components,org.apache.felix.scr.integration.components.activatesignature" )
                 .set( "Service-Component", "OSGI-INF/components.xml" )
             )
             .build( TinyBundles.asStream() );
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/AbstractActivateSignatureTestComponent.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/AbstractActivateSignatureTestComponent.java
new file mode 100644
index 0000000..6061d6b
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/AbstractActivateSignatureTestComponent.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import java.util.Map;
+
+import org.osgi.service.component.ComponentConstants;
+import org.osgi.service.component.ComponentContext;
+
+
+public abstract class AbstractActivateSignatureTestComponent
+{
+
+    private String methodCalled;
+
+
+    public String getMethodCalled()
+    {
+        return methodCalled;
+    }
+
+
+    protected void setMethodCalled( String methodCalled )
+    {
+        this.methodCalled = methodCalled;
+    }
+
+
+    protected void setMethodCalled( ComponentContext context )
+    {
+        final String method = ( String ) context.getProperties().get( ComponentConstants.COMPONENT_NAME );
+        setMethodCalled( method );
+    }
+
+
+    protected void setMethodCalled( Map<?, ?> context )
+    {
+        final String method = ( String ) context.get( ComponentConstants.COMPONENT_NAME );
+        setMethodCalled( method );
+    }
+
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_BundleContext.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_BundleContext.java
new file mode 100644
index 0000000..a33446b
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_BundleContext.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import org.osgi.framework.BundleContext;
+
+
+public class Signature_Package_BundleContext extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings("unused")
+    void activate( BundleContext context )
+    {
+        setMethodCalled( "package_activate_BundleContext" );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_ComponentContext.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_ComponentContext.java
new file mode 100644
index 0000000..cad65a7
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_ComponentContext.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import org.osgi.service.component.ComponentContext;
+
+
+public class Signature_Package_ComponentContext extends AbstractActivateSignatureTestComponent
+{
+
+    void activate( @SuppressWarnings("unused") ComponentContext context )
+    {
+        setMethodCalled( context );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_Map.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_Map.java
new file mode 100644
index 0000000..c5b3279
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Package_Map.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import java.util.Map;
+
+
+public class Signature_Package_Map extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings({ "unchecked" })
+    void activate( Map config )
+    {
+        setMethodCalled( config );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_BundleContext.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_BundleContext.java
new file mode 100644
index 0000000..2097b1d
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_BundleContext.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import org.osgi.framework.BundleContext;
+
+
+public class Signature_Private_BundleContext extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings("unused")
+    private void activate( BundleContext context )
+    {
+        setMethodCalled( "private_activate_BundleContext" );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_ComponentContext.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_ComponentContext.java
new file mode 100644
index 0000000..fea8803
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_ComponentContext.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import org.osgi.service.component.ComponentContext;
+
+
+public class Signature_Private_ComponentContext extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings("unused")
+    private void activate( ComponentContext context )
+    {
+        setMethodCalled( context );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_Map.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_Map.java
new file mode 100644
index 0000000..7d06be1
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Private_Map.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import java.util.Map;
+
+
+public class Signature_Private_Map extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings({ "unchecked", "unused" })
+    private void activate( Map config )
+    {
+        setMethodCalled( config );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_BundleContext.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_BundleContext.java
new file mode 100644
index 0000000..71543aa
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_BundleContext.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import org.osgi.framework.BundleContext;
+
+
+public class Signature_Protected_BundleContext extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings("unused")
+    protected void activate( BundleContext context )
+    {
+        setMethodCalled( "protected_activate_BundleContext" );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_ComponentContext.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_ComponentContext.java
new file mode 100644
index 0000000..6cf51c0
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_ComponentContext.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import org.osgi.service.component.ComponentContext;
+
+
+public class Signature_Protected_ComponentContext extends AbstractActivateSignatureTestComponent
+{
+
+    protected void activate( @SuppressWarnings("unused") ComponentContext context )
+    {
+        setMethodCalled( context );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_Map.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_Map.java
new file mode 100644
index 0000000..0f22b1d
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Protected_Map.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import java.util.Map;
+
+
+public class Signature_Protected_Map extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings({ "unchecked" })
+    protected void activate( Map config )
+    {
+        setMethodCalled( config );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_BundleContext.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_BundleContext.java
new file mode 100644
index 0000000..c9d7dbe
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_BundleContext.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import org.osgi.framework.BundleContext;
+
+
+public class Signature_Public_BundleContext extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings("unused")
+    public void activate( BundleContext context )
+    {
+        setMethodCalled( "public_activate_BundleContext" );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_ComponentContext.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_ComponentContext.java
new file mode 100644
index 0000000..04b28da
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_ComponentContext.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import org.osgi.service.component.ComponentContext;
+
+
+public class Signature_Public_ComponentContext extends AbstractActivateSignatureTestComponent
+{
+
+    public void activate( @SuppressWarnings("unused") ComponentContext context )
+    {
+        setMethodCalled( context );
+    }
+}
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_Map.java b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_Map.java
new file mode 100644
index 0000000..6034fd2
--- /dev/null
+++ b/scr/src/test/java/org/apache/felix/scr/integration/components/activatesignature/Signature_Public_Map.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.scr.integration.components.activatesignature;
+
+
+import java.util.Map;
+
+
+public class Signature_Public_Map extends AbstractActivateSignatureTestComponent
+{
+
+    @SuppressWarnings({ "unchecked" })
+    public void activate( Map config )
+    {
+        setMethodCalled( config );
+    }
+}