Avoid deprecated Mockito methods

Issue: SPR-14880
This commit is contained in:
Juergen Hoeller
2016-11-04 12:24:46 +01:00
parent 475b876f08
commit ac774cdcef
7 changed files with 44 additions and 43 deletions

View File

@@ -55,7 +55,7 @@ public class ProtobufHttpMessageConverterTests {
@Test
public void extensionRegistryInitialized() {
verify(this.registryInitializer, times(1)).initializeExtensionRegistry(anyObject());
verify(this.registryInitializer, times(1)).initializeExtensionRegistry(any());
}
@Test

View File

@@ -148,10 +148,10 @@ public class ModelAttributeMethodProcessorTests {
public void resovleArgumentViaDefaultConstructor() throws Exception {
WebDataBinder dataBinder = new WebRequestDataBinder(null);
WebDataBinderFactory factory = mock(WebDataBinderFactory.class);
given(factory.createBinder(anyObject(), notNull(), eq("attrName"))).willReturn(dataBinder);
given(factory.createBinder(any(), notNull(), eq("attrName"))).willReturn(dataBinder);
this.processor.resolveArgument(this.paramNamedValidModelAttr, this.container, this.request, factory);
verify(factory).createBinder(anyObject(), notNull(), eq("attrName"));
verify(factory).createBinder(any(), notNull(), eq("attrName"));
}
@Test