### Question:
DynoDao { public <T> Stream<T> get(DynoDaoLoad<T> load) { return load.load(amazonDynamoDb); } DynoDao(AmazonDynamoDB amazonDynamoDb); Stream<T> get(DynoDaoLoad<T> load); Stream<T> get(DynoDaoQuery<T> query); Stream<T> get(DynoDaoScan<T> scan); Stream<T> get(DynoDaoScan<T> parallelScan, int totalParallelScanSegments);  }### Answer:
@Test void get_load_returnsLoadResult() { Stream<Item> load = Stream.of(ITEM); when(loadMock.load(amazonDynamoDbMock)).thenReturn(load); assertThat(classUnderTest.get(loadMock)).isSameAs(load); verify(loadMock).load(amazonDynamoDbMock); verifyNoMoreInteractions(loadMock, queryMock, scanMock, amazonDynamoDbMock); }
@Test void get_query_returnsQueryResult() { Stream<Item> query = Stream.of(ITEM); when(queryMock.query(amazonDynamoDbMock)).thenReturn(query); assertThat(classUnderTest.get(queryMock)).isSameAs(query); verify(queryMock).query(amazonDynamoDbMock); verifyNoMoreInteractions(loadMock, queryMock, scanMock, amazonDynamoDbMock); }
@Test void get_scan_returnsScanResult() { Stream<Item> scan = Stream.of(ITEM); when(scanMock.scan(amazonDynamoDbMock)).thenReturn(scan); assertThat(classUnderTest.get(scanMock)).isSameAs(scan); verify(scanMock).scan(amazonDynamoDbMock); verifyNoMoreInteractions(loadMock, queryMock, scanMock, amazonDynamoDbMock); }
@Test void get_parallelScan_returnsParallelScanResult() { Stream<Item> scan = Stream.of(ITEM); when(scanMock.parallelScan(amazonDynamoDbMock, SEGMENTS)).thenReturn(scan); assertThat(classUnderTest.get(scanMock, SEGMENTS)).isSameAs(scan); verify(scanMock).parallelScan(amazonDynamoDbMock, SEGMENTS); verifyNoMoreInteractions(loadMock, queryMock, scanMock, amazonDynamoDbMock); }