[ 
https://issues.apache.org/jira/browse/SLING-4813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14587901#comment-14587901
 ] 

Krystian Panek commented on SLING-4813:
---------------------------------------

https://github.com/apache/sling/pull/97

> Support OSGi service mocked by e.g Mockito
> ------------------------------------------
>
>                 Key: SLING-4813
>                 URL: https://issues.apache.org/jira/browse/SLING-4813
>             Project: Sling
>          Issue Type: Improvement
>          Components: Testing
>            Reporter: Krystian Panek
>
> I'd like to use my existing service and mock one of its method (which is 
> calling remote API). But I cannot do that becuase SCR service descriptor 
> cannot be found for CGLIB enhanced class.
> {code}OsgiServiceUtil.injectServices(Mockito.spy(MyServiceImpl()), 
> bundleContext){code}
> It would be great if in further release of mock-osgi such case will be 
> supported. Thanks in advance! I have a hit that may work... I will create a 
> PR in a few seconds for it...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to