use of com.amazonaws.athena.connector.lambda.domain.spill.SpillLocationVerifier in project aws-athena-query-federation by awslabs.
the class CompositeHandlerTest method doGetSplits.
@Test
public void doGetSplits() throws Exception {
GetSplitsRequest req = mock(GetSplitsRequest.class);
when(req.getRequestType()).thenReturn(MetadataRequestType.GET_SPLITS);
SpillLocationVerifier mockVerifier = mock(SpillLocationVerifier.class);
doNothing().when(mockVerifier).checkBucketAuthZ(any(String.class));
Whitebox.setInternalState(mockMetadataHandler, "verifier", mockVerifier);
compositeHandler.handleRequest(allocator, req, new ByteArrayOutputStream(), objectMapper);
verify(mockMetadataHandler, times(1)).doGetSplits(any(BlockAllocatorImpl.class), any(GetSplitsRequest.class));
}
Aggregations