Search in sources :

Example 1 with ResourceNotFoundException

use of com.amazonaws.services.kinesisvideo.model.ResourceNotFoundException in project aws-sdk-android by aws-amplify.

the class ResourceNotFoundExceptionUnmarshaller method unmarshall.

@Override
public AmazonServiceException unmarshall(JsonErrorResponse error) throws Exception {
    ResourceNotFoundException e = (ResourceNotFoundException) super.unmarshall(error);
    e.setErrorCode("ResourceNotFoundException");
    return e;
}
Also used : ResourceNotFoundException(com.amazonaws.services.kinesisvideo.model.ResourceNotFoundException)

Example 2 with ResourceNotFoundException

use of com.amazonaws.services.kinesisvideo.model.ResourceNotFoundException in project aws-iot-greengrass-edge-connector-for-kinesis-video-stream by awslabs.

the class KvsClientTest method describeStream_ResourceNotFound.

@Test
public void describeStream_ResourceNotFound() {
    // when
    when(amazonKinesisVideoClient.describeStream(any())).thenThrow(new ResourceNotFoundException(""));
    // then
    Optional<StreamInfo> result = kvsClient.describeStream(STREAM_NAME);
    // verify
    assertFalse(result.isPresent());
}
Also used : StreamInfo(com.amazonaws.services.kinesisvideo.model.StreamInfo) ResourceNotFoundException(com.amazonaws.services.kinesisvideo.model.ResourceNotFoundException) Test(org.junit.jupiter.api.Test)

Aggregations

ResourceNotFoundException (com.amazonaws.services.kinesisvideo.model.ResourceNotFoundException)2 StreamInfo (com.amazonaws.services.kinesisvideo.model.StreamInfo)1 Test (org.junit.jupiter.api.Test)1