Search in sources :

Example 6 with PublishResponse

use of software.amazon.awssdk.services.sns.model.PublishResponse in project beam by apache.

the class PublishResponseCodersTest method testFullPublishResponseIncludingHeadersDecodeEncodeEquals.

@Test
public void testFullPublishResponseIncludingHeadersDecodeEncodeEquals() throws Exception {
    CoderProperties.coderDecodeEncodeEqual(PublishResponseCoders.fullPublishResponse(), PublishResponse.builder().messageId(UUID.randomUUID().toString()).build());
    PublishResponse value = buildFullPublishResponse();
    PublishResponse clone = CoderUtils.clone(PublishResponseCoders.fullPublishResponse(), value);
    assertThat(clone.responseMetadata().requestId(), equalTo(value.responseMetadata().requestId()));
    assertThat(clone.sdkHttpResponse().statusCode(), equalTo(value.sdkHttpResponse().statusCode()));
    assertThat(clone.sdkHttpResponse().headers(), equalTo(value.sdkHttpResponse().headers()));
}
Also used : PublishResponseCoders.defaultPublishResponse(org.apache.beam.sdk.io.aws2.sns.PublishResponseCoders.defaultPublishResponse) PublishResponse(software.amazon.awssdk.services.sns.model.PublishResponse) Test(org.junit.Test)

Aggregations

PublishResponse (software.amazon.awssdk.services.sns.model.PublishResponse)6 PublishResponseCoders.defaultPublishResponse (org.apache.beam.sdk.io.aws2.sns.PublishResponseCoders.defaultPublishResponse)2 Test (org.junit.Test)2 PublishRequest (software.amazon.awssdk.services.sns.model.PublishRequest)2 SnsException (software.amazon.awssdk.services.sns.model.SnsException)2 AutoValue (com.google.auto.value.AutoValue)1 Serializable (java.io.Serializable)1 Optional (java.util.Optional)1 OptionalInt (java.util.OptionalInt)1 NonNull (org.checkerframework.checker.nullness.qual.NonNull)1 Nullable (org.checkerframework.checker.nullness.qual.Nullable)1 SdkHttpResponse (software.amazon.awssdk.http.SdkHttpResponse)1