use of software.amazon.awssdk.services.kinesis.model.DeregisterStreamConsumerResponse in project flink by apache.
the class KinesisProxyV2Test method testDeregisterStreamConsumer.
@Test
public void testDeregisterStreamConsumer() throws Exception {
KinesisAsyncClient client = mock(KinesisAsyncClient.class);
KinesisProxyV2 proxy = new KinesisProxyV2(client, mock(SdkAsyncHttpClient.class), createConfiguration(), mock(FullJitterBackoff.class));
DeregisterStreamConsumerResponse expected = DeregisterStreamConsumerResponse.builder().build();
ArgumentCaptor<DeregisterStreamConsumerRequest> requestCaptor = ArgumentCaptor.forClass(DeregisterStreamConsumerRequest.class);
when(client.deregisterStreamConsumer(requestCaptor.capture())).thenReturn(CompletableFuture.completedFuture(expected));
DeregisterStreamConsumerResponse actual = proxy.deregisterStreamConsumer("arn");
assertEquals(expected, actual);
DeregisterStreamConsumerRequest request = requestCaptor.getValue();
assertEquals("arn", request.consumerARN());
}
Aggregations