Regression with InOrder verification after #2369
See original GitHub issueThe following test starts failing after https://github.com/mockito/mockito/commit/123beb8311ed6303ba71d682cff8434fe36b7f0f. It looks like the change to call actual equals
and hashCode
methods is catching a call to equals
inside the implementation of InOrder
.
package com.test;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.spy;
import org.junit.Test;
import org.mockito.InOrder;
public class AppTest {
static class Foo {
void foo() {}
}
@Test
public void test() {
Foo mock1 = spy(new Foo());
Foo mock2 = spy(new Foo());
mock1.foo();
InOrder order = inOrder(mock1, mock2);
order.verify(mock1).foo();
order.verifyNoMoreInteractions();
}
}
No interactions wanted here:
-> at com.test.AppTest.test(AppTest.java:22)
But found this interaction on mock 'foo':
-> at java.base/java.util.LinkedList.indexOf(LinkedList.java:609)
at com.test.AppTest.test(AppTest.java:22)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
STATS 361: Causal Inference - Stanford University
Today's lecture is about estimation of average treatment effects in RCTs in terms of the potential outcomes model, and discusses the role of...
Read more >lassopack: Model Selection and Prediction with Regularized ...
In the context of regularized regression, cross-validation can be used to select the tuning parameters that yield the best performance, e.g., ...
Read more >Distribution-Free Predictive Inference for Regression
We develop a general framework for distribution-free predictive inference in regres- sion, using conformal inference. The proposed methodology allows for ...
Read more >Regression methods for investigating risk factors of chronic ...
Papers were excluded if they investigated only (i) non CKD outcomes in patients with kidney disease or outcomes occurring after kidney ...
Read more >Double-Lasso Regression for Principled Variable Selection
(2014) (age, gender, marital status and income) as covariates, as well as several other variables and interactions. (Table 2). In the resulting model,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
3.12.1 is currently being pushed to Maven Central. It should be available in a couple of hours.
Thanks for the quick fix here, @TimvdLippe. I can confirm that 3.12.1 solved the aforementioned problem for Axon Framework.