mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Ensure checking customizer ordering
See gh-15603
This commit is contained in:
parent
0598d7796a
commit
b34e752db6
@ -24,6 +24,7 @@ import java.util.function.Supplier;
|
||||
import org.apache.http.client.config.RequestConfig;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mockito.InOrder;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
@ -47,6 +48,7 @@ import org.springframework.web.util.UriTemplateHandler;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.inOrder;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@ -401,8 +403,9 @@ public class RestTemplateBuilderTests {
|
||||
RestTemplateCustomizer customizer2 = mock(RestTemplateCustomizer.class);
|
||||
RestTemplate template = this.builder.customizers(customizer1)
|
||||
.additionalCustomizers(customizer2).build();
|
||||
verify(customizer1).customize(template);
|
||||
verify(customizer2).customize(template);
|
||||
InOrder inOrder = inOrder(customizer1, customizer2);
|
||||
inOrder.verify(customizer1).customize(template);
|
||||
inOrder.verify(customizer2).customize(template);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user