[ https://issues.apache.org/jira/browse/TOMEE-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16104939#comment-16104939 ]
Romain Manni-Bucau commented on TOMEE-2104: ------------------------------------------- Hi Xavier, agree, we should provide a rule or container lifecycle listener to reset mocks (calling MockRegistry.reset(); in after). Note these 2 options are valid workaround for released versions > Mocks are reused across tests with ApplicationComposer > ------------------------------------------------------ > > Key: TOMEE-2104 > URL: https://issues.apache.org/jira/browse/TOMEE-2104 > Project: TomEE > Issue Type: Bug > Affects Versions: 7.0.3 > Reporter: Xavier Dury > Priority: Minor > Attachments: ApplicationComposerBug.java > > > When I use ApplicationComposer with mockito and have the following tests: > 1) A first test which mocks some dependency > 2) A second test which does not use mocks but some real implementation of the > dependency > Then the mock from the first test will be used in the second test instead of > the real implementation. -- This message was sent by Atlassian JIRA (v6.4.14#64029)