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

@@ -20,9 +20,7 @@ import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations;
import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.endpoint.http.ApiVersion;
@@ -59,11 +57,6 @@ abstract class HealthEndpointSupportTests<R extends ContributorRegistry<C>, C, T
this.registry = createRegistry();
}
@BeforeEach
void setup() {
MockitoAnnotations.initMocks(this);
}
@Test
void createWhenRegistryIsNullThrowsException() {
assertThatIllegalArgumentException().isThrownBy(() -> create(null, this.groups))