Search in sources :

Example 1 with InternalErrorException

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

the class SnsIOTest method getAmazonSnsMockErrors.

private static AmazonSNS getAmazonSnsMockErrors() {
    final AmazonSNS amazonSNS = Mockito.mock(AmazonSNS.class);
    configureAmazonSnsMock(amazonSNS);
    Mockito.when(amazonSNS.publish(Mockito.any())).thenThrow(new InternalErrorException("Service unavailable"));
    return amazonSNS;
}
Also used : InternalErrorException(com.amazonaws.services.sns.model.InternalErrorException) AmazonSNS(com.amazonaws.services.sns.AmazonSNS)

Aggregations

AmazonSNS (com.amazonaws.services.sns.AmazonSNS)1 InternalErrorException (com.amazonaws.services.sns.model.InternalErrorException)1