Kyle Giovannetti created SLING-10068:
----------------------------------------

             Summary: CAConfig Mock Plugin: NPE when using `@Nested` tests
                 Key: SLING-10068
                 URL: https://issues.apache.org/jira/browse/SLING-10068
             Project: Sling
          Issue Type: Bug
          Components: Testing
            Reporter: Kyle Giovannetti


When using the caconfig mocking plugin as per the example here: 
 
[https://github.com/apache/sling-org-apache-sling-testing-caconfig-mock-plugin/blob/master/src/test/java/org/apache/sling/testing/mock/caconfig/ContextPluginsTest.java]

 

If the tests are located inside an inner class annotated with the `@Nested` 
annotation, then a NPE occurs:

 
{code:java}
java.lang.NullPointerExceptionjava.lang.NullPointerException at   
org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:101)
 at 
org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:125)
 at 
org.apache.sling.testing.mock.caconfig.MockContextAwareConfig.writeConfiguration(MockContextAwareConfig.java:113)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to