[x] Example that reproduces the problem uploaded to Github
[x] Full description of the issue provided (see below)
Steps to Reproduce
Add Auditable to a domain
Implement/override the clone() method for a domain, selectively omitting properties
Unit test the clone method and see the exception
Full details in linked example application.
Expected Behaviour
An exception should not be thrown when there is no AuditRequestResolver bean provided, instead the default fallback behaviour should be used (a default String etc.)
Actual Behaviour
While unit testing myDomainInstance.clone() a NoSuchBeanDefinitionException is thrown once Auditable is added to the Domain class. Note that this is not the only time it is an issue, but the simplest way to reproduce.
This will likely only manifest as a test issue, given the plugin explicitly registers the bean on application startup.
Task List
Steps to Reproduce
Auditable
to a domainclone()
method for a domain, selectively omitting propertiesclone
method and see the exceptionFull details in linked example application.
Expected Behaviour
An exception should not be thrown when there is no
AuditRequestResolver
bean provided, instead the default fallback behaviour should be used (a default String etc.)Actual Behaviour
While unit testing
myDomainInstance.clone()
aNoSuchBeanDefinitionException
is thrown onceAuditable
is added to the Domain class. Note that this is not the only time it is an issue, but the simplest way to reproduce.This will likely only manifest as a test issue, given the plugin explicitly registers the bean on application startup.
Environment Information
Example Application
https://github.com/andrewcanby-finocomp/audit-bean-in-tests