Skip to content

Commit

Permalink
remove deprecated @SpyBean
Browse files Browse the repository at this point in the history
  • Loading branch information
davidangb committed Dec 11, 2024
1 parent 5cad5d0 commit 8bc578c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.bean.override.mockito.MockitoSpyBean;

/**
* A test to verify that the human-readable-logging Spring Profile will disable the configuration of
Expand All @@ -32,7 +33,7 @@ class HumanReadableLoggingTest {

@Autowired private TestRestTemplate testRestTemplate;
// Spy bean to allow us to mock out the RequestIdFilter ID generator.
@SpyBean private RequestIdFilter requestIdFilter;
@MockitoSpyBean private RequestIdFilter requestIdFilter;

@BeforeEach
void setUp() {
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/bio/terra/common/logging/LoggingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.ResponseEntity;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.bean.override.mockito.MockitoSpyBean;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

/**
Expand Down Expand Up @@ -55,7 +56,7 @@ public class LoggingTest {

@Autowired private TestRestTemplate testRestTemplate;
// Spy bean to allow us to mock out the RequestIdFilter ID generator.
@SpyBean private RequestIdFilter requestIdFilter;
@MockitoSpyBean private RequestIdFilter requestIdFilter;

@BeforeEach
public void setUp() throws IOException, ServletException {
Expand Down

0 comments on commit 8bc578c

Please sign in to comment.