Skip to content

Commit 8600489

Browse files
committed
Merge pull request #14707 from dreis2211
* pr/14707: Remove unused fields in tests
2 parents bbdd6cc + 55ec016 commit 8600489

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/PropertiesMeterFilterTests.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,9 @@
2424
import io.micrometer.core.instrument.config.MeterFilterReply;
2525
import io.micrometer.core.instrument.distribution.DistributionStatisticConfig;
2626
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
27-
import org.junit.Before;
2827
import org.junit.Rule;
2928
import org.junit.Test;
3029
import org.junit.rules.ExpectedException;
31-
import org.mockito.Mock;
32-
import org.mockito.MockitoAnnotations;
3330

3431
import org.springframework.boot.context.properties.bind.Bindable;
3532
import org.springframework.boot.context.properties.bind.Binder;
@@ -49,14 +46,6 @@ public class PropertiesMeterFilterTests {
4946
@Rule
5047
public ExpectedException thrown = ExpectedException.none();
5148

52-
@Mock
53-
private DistributionStatisticConfig config;
54-
55-
@Before
56-
public void setup() {
57-
MockitoAnnotations.initMocks(this);
58-
}
59-
6049
@Test
6150
public void createWhenPropertiesIsNullShouldThrowException() {
6251
this.thrown.expect(IllegalArgumentException.class);

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryCustomizerTests.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@
2424
import org.junit.Before;
2525
import org.junit.Test;
2626
import org.mockito.ArgumentCaptor;
27-
import org.mockito.Captor;
28-
import org.mockito.MockitoAnnotations;
2927

3028
import org.springframework.boot.autoconfigure.web.ServerProperties;
3129
import org.springframework.boot.context.properties.bind.Bindable;
3230
import org.springframework.boot.context.properties.bind.Binder;
3331
import org.springframework.boot.context.properties.source.ConfigurationPropertySource;
3432
import org.springframework.boot.context.properties.source.MapConfigurationPropertySource;
3533
import org.springframework.boot.web.server.Ssl;
36-
import org.springframework.boot.web.servlet.ServletContextInitializer;
3734
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
3835
import org.springframework.boot.web.servlet.server.Jsp;
3936
import org.springframework.boot.web.servlet.server.Session;
@@ -56,12 +53,8 @@ public class ServletWebServerFactoryCustomizerTests {
5653

5754
private ServletWebServerFactoryCustomizer customizer;
5855

59-
@Captor
60-
private ArgumentCaptor<ServletContextInitializer[]> initializersCaptor;
61-
6256
@Before
6357
public void setup() {
64-
MockitoAnnotations.initMocks(this);
6558
this.customizer = new ServletWebServerFactoryCustomizer(this.properties);
6659
}
6760

spring-boot-project/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/CommandRunnerTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ public class CommandRunnerTests {
5151
@Mock
5252
private Command regularCommand;
5353

54-
@Mock
55-
private Command shellCommand;
56-
5754
@Mock
5855
private Command anotherCommand;
5956

0 commit comments

Comments
 (0)