Simplify some code

See gh-18438
This commit is contained in:
kenneth
2019-09-30 14:54:18 +08:00
committed by Phillip Webb
parent e41c5a4327
commit e6b45de41e
7 changed files with 7 additions and 19 deletions

View File

@@ -92,7 +92,7 @@ class MockitoTestExecutionListenerTests {
given(mockTestContext.getAttribute(DependencyInjectionTestExecutionListener.REINJECT_DEPENDENCIES_ATTRIBUTE))
.willReturn(Boolean.TRUE);
this.listener.beforeTestMethod(mockTestContext);
verify(this.postProcessor).inject(this.fieldCaptor.capture(), eq(instance), (MockDefinition) any());
verify(this.postProcessor).inject(this.fieldCaptor.capture(), eq(instance), any(MockDefinition.class));
assertThat(this.fieldCaptor.getValue().getName()).isEqualTo("mockBean");
}