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

indrajithp11346
indrajithp11346
Offline

Badges

Badges
6

Accepted Solutions

Accepted Solutions
0

Likes

Likes
1

Posts

Posts
8

Discussions

Discussions
3

Questions

Questions
5

Ideas

Ideas
0

Blog Posts

Blog Posts
0
Top badges earned by indrajithp11346
Customize the badges you want to showcase on your profile
Re: Mock Casting of jcr Session to Jackrabbit Session - (JackrabbitSession) session
Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,392 likes

Total Posts

3,341 posts

Correct reply

1,136 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
- Adobe Experience Manager
I would refactor the code in a way, that the cast to the JackrabbitSession plus all dependent functionality is separated in a dedicated method, and then stub this method with Mockito completely.(Also I would recommend to use SlingContext, so you don't need to mock resources and nodes. See [1] for a sample.)[1] https://cqdump.wordpress.com/2019/01/17/writing-unittests-for-aem-part-3-mocking-resources/

Views

2.7K

Likes

0

Replies

0
Re: Delete User UUID Reference from Group
Avatar
Give Back 5
Level 2
indrajithp11346
Level 2

Like

1 like

Total Posts

8 posts

Correct reply

0 solutions
Top badges earned
Give Back 5
Give Back 3
Validate 1
Ignite 1
Give Back
View profile
indrajithp11346
- Adobe Experience Manager
Hi Arun, Thank you for your help.Regards,Indrajith

Views

454

Likes

0

Replies

0
Likes given to
Likes from