Remove redundant MockitoAnnotations.initMocks()

See gh-20601
This commit is contained in:
dreis2211
2020-03-21 17:45:08 +01:00
committed by Stephane Nicoll
parent 70aa788747
commit ef9f1d39a3
4 changed files with 3 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,9 +16,7 @@
package org.springframework.boot.test.mock.mockito;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations;
import org.springframework.test.context.ContextCustomizer;
@@ -33,11 +31,6 @@ class MockitoContextCustomizerFactoryTests {
private final MockitoContextCustomizerFactory factory = new MockitoContextCustomizerFactory();
@BeforeEach
void setup() {
MockitoAnnotations.initMocks(this);
}
@Test
void getContextCustomizerWithoutAnnotationReturnsCustomizer() {
ContextCustomizer customizer = this.factory.createContextCustomizer(NoMockBeanAnnotation.class, null);