In our project we are testing jpa database access with the weld-junit5 framework. The EntityManager is injected into the test class. The entity to be saved is annotated with a custom validator.
The problem is that the custom validator itself needs an instance, which in this case is not injected.
A nullpointer exception is thrown here because myDao was not instantiated.
For more clarity you can browse throw this essential project on github (branch validation)
https://github.com/duschata/testingIssues/tree/validation
Kind regards Tom