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

Junit test fails in latest Eclipse


Level 3

Running junit in the latest Eclipse (Eclipse IDE for Enterprise Java and Web Developers, version 2022-03 (4.23.0)) fails to adaptTo resource, instead it returns null.

Same test in the same workspace just in older Eclispe (Eclipse IDE for Enterprise Java Developers, 2019-03 (4.11.0)) executes test with no problem.


final SmallCarousel actual = ctx.request().adaptTo(SmallCarousel.class);

"actual" ends up to be null after execution of this line...


When debugging in older Eclipse I could see that MockAdapterManagerImpl.getAdapter returns factory for SmallCarousel in a call to, 

final Map<String, List<AdapterFactoryDescriptor>> factories = getAdapterFactories(adaptable.getClass());


Same Map in new Eclipse doesn't contain factory for SmallCarousel.



2 Replies