diff --git a/sdk/metrics/src/test/java/io/opentelemetry/sdk/metrics/internal/view/AdviceAttributesProcessorTest.java b/sdk/metrics/src/test/java/io/opentelemetry/sdk/metrics/internal/view/AdviceAttributesProcessorTest.java index f603a9f01ba..294c05ea157 100644 --- a/sdk/metrics/src/test/java/io/opentelemetry/sdk/metrics/internal/view/AdviceAttributesProcessorTest.java +++ b/sdk/metrics/src/test/java/io/opentelemetry/sdk/metrics/internal/view/AdviceAttributesProcessorTest.java @@ -10,6 +10,7 @@ import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat; import static java.util.Arrays.asList; import static java.util.Collections.emptyList; +import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.entry; import io.opentelemetry.api.common.Attributes; @@ -44,7 +45,7 @@ void removeUnwantedAttributes() { @Test void stringRepresentation() { - assertThat(new AdviceAttributesProcessor(asList(stringKey("abc"), stringKey("def"))).toString()) - .isEqualTo("AdviceAttributesProcessor{attributeKeys=[def, abc]}"); + assertThat(new AdviceAttributesProcessor(singletonList(stringKey("abc"))).toString()) + .isEqualTo("AdviceAttributesProcessor{attributeKeys=[abc]}"); } }