1 Reply Latest reply on Jan 15, 2018 5:37 AM by PuzanovsP

    Unit testing component bean which calls this.getWcmMode().isDisabled()

    RobertBailey2017 Level 1

      Hi All,


      I am trying to unit test an AEM component bean using JUnit 4.


      The component bean extends AbstractSightlyComponentBean and it calls this.getWcmMode().isDisabled().


      When unit testing, this.getWcmMode() is returning null.


      Does anyone know how I can set or mock WCM Mode within JUnit 4 testing enviromnnent?


      Thanks your your time,

      Best regards,