Example usage for com.amazonaws.services.sns.model GetTopicAttributesResult getSdkHttpMetadata

List of usage examples for com.amazonaws.services.sns.model GetTopicAttributesResult getSdkHttpMetadata

Introduction

In this page you can find the example usage for com.amazonaws.services.sns.model GetTopicAttributesResult getSdkHttpMetadata.

Prototype

public SdkHttpMetadata getSdkHttpMetadata() 

Source Link

Usage

From source file:org.apache.beam.sdk.io.aws.sns.AmazonSNSMock.java

License:Apache License

@Override
public GetTopicAttributesResult getTopicAttributes(String topicArn) {
    GetTopicAttributesResult result = Mockito.mock(GetTopicAttributesResult.class);
    SdkHttpMetadata metadata = Mockito.mock(SdkHttpMetadata.class);
    Mockito.when(metadata.getHttpHeaders()).thenReturn(new HashMap<>());
    Mockito.when(metadata.getHttpStatusCode()).thenReturn(200);
    Mockito.when(result.getSdkHttpMetadata()).thenReturn(metadata);
    return result;
}