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);
}
Aggregations