Search in sources :

Example 1 with GetTopicAttributesResult

use of com.amazonaws.services.sns.model.GetTopicAttributesResult in project beam by apache.

the class SnsIOTest method configureAmazonSnsMock.

private static void configureAmazonSnsMock(AmazonSNS amazonSNS) {
    final GetTopicAttributesResult result = Mockito.mock(GetTopicAttributesResult.class);
    final 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);
    Mockito.when(amazonSNS.getTopicAttributes(Mockito.anyString())).thenReturn(result);
}
Also used : SdkHttpMetadata(com.amazonaws.http.SdkHttpMetadata) GetTopicAttributesResult(com.amazonaws.services.sns.model.GetTopicAttributesResult)

Aggregations

SdkHttpMetadata (com.amazonaws.http.SdkHttpMetadata)1 GetTopicAttributesResult (com.amazonaws.services.sns.model.GetTopicAttributesResult)1