You are facing a NPE because the Junit test you are writing is a basic unit test with no server-side integration and hence, the instance of AssemblerService will always be null. What you need to write is an integration test using Apache Sling Teleporter framework which will help you write the test l...