Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to write the JUnit

Level 4
Level 4

For the below code I am unable to write the JUnit for @Postconstruct init()


But for text JUNIT is working fine via JSON. Need help

private Page currentPage;

Private String text;

private String pageTitle;
protected void init() {
    if(!(currentPage.getName().equalsIgnoreCase("Product") || currentPage.getTemplate.getPath.equals("/conf/we-retail/settings/wcm/templates/hero")))

public void getText()
{ return text;}


2 Replies