SLING-10975 osgi-mock: Remove duplicate handling of ServiceFactory implementation
diff --git a/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java b/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java
index 2b3aed7..a5e0983 100644
--- a/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java
+++ b/core/src/main/java/org/apache/sling/testing/mock/osgi/MockServiceRegistration.java
@@ -119,15 +119,8 @@
         return clazzes;
     }
 
-    @SuppressWarnings({ "unchecked", "null" })
     T getService() {
-        if (this.service instanceof ServiceFactory) {
-            ServiceFactory<T> factory = (ServiceFactory<T>)this.service;
-            return factory.getService(this.bundleContext.getBundle(), this);
-        }
-        else {
-            return this.service;
-        }
+        return this.service;
     }
 
     @Override