Skip to content

Commit 021491d

Browse files
authored
Add assertion to test case (#5721)
1 parent b5aab40 commit 021491d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

services/dynamodb/src/test/java/software/amazon/awssdk/services/dynamodb/PaginatorInUserAgentTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
2323
import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
2424
import static com.github.tomakehurst.wiremock.client.WireMock.verify;
25+
import static org.assertj.core.api.Assertions.assertThat;
2526
import static software.amazon.awssdk.core.useragent.BusinessMetricCollection.METRIC_SEARCH_PATTERN;
2627

2728
import com.github.tomakehurst.wiremock.junit.WireMockRule;
@@ -69,7 +70,7 @@ public void setup() {
6970

7071

7172
@Test
72-
public void syncPaginator_shouldHavePaginatorUserAgent() throws IOException {
73+
public void syncPaginator_shouldHavePaginatorUserAgent() {
7374
stubFor(any(urlEqualTo("/"))
7475
.willReturn(aResponse()
7576
.withStatus(500)));
@@ -84,16 +85,15 @@ public void syncPaginator_shouldHavePaginatorUserAgent() throws IOException {
8485
}
8586

8687
@Test
87-
public void syncPaginator_shuldHavePaginatorUserAgent() throws IOException {
88+
public void endpointBuiltIn_withBusinessMetricsAndClientEndpointProvider_shouldReturnEndpointOverride() {
8889
ExecutionAttributes executionAttributes = new ExecutionAttributes();
8990
BusinessMetricCollection newmetrics = new BusinessMetricCollection();
9091
newmetrics.addMetric("R");
9192

9293
ClientEndpointProvider wohoo = ClientEndpointProvider.forEndpointOverride(URI.create("http://wohoo"));
9394
executionAttributes.putAttribute(SdkInternalExecutionAttribute.BUSINESS_METRICS, newmetrics);
9495
executionAttributes.putAttribute(SdkInternalExecutionAttribute.CLIENT_ENDPOINT_PROVIDER, wohoo);
95-
String s = AwsEndpointProviderUtils.endpointBuiltIn(executionAttributes);
96-
System.out.println(s);
96+
assertThat(AwsEndpointProviderUtils.endpointBuiltIn(executionAttributes)).isEqualTo("http://wohoo");
9797
}
9898

9999
@Test

0 commit comments

Comments
 (0)