use of org.wso2.carbon.apimgt.gateway.handlers.security.keys.WSAPIKeyDataStore in project carbon-apimgt by wso2.
the class APIKeyValidatorTestCase method testDatasourceConfigurationAndCleanup.
@Test
public void testDatasourceConfigurationAndCleanup() throws Exception {
AxisConfiguration axisConfig = Mockito.mock(AxisConfiguration.class);
WSAPIKeyDataStore wsDataStore = Mockito.mock(WSAPIKeyDataStore.class);
PowerMockito.whenNew(WSAPIKeyDataStore.class).withNoArguments().thenReturn(wsDataStore);
APIKeyValidator wsKeyValidator = new APIKeyValidator() {
};
// test cleanup for WSClient
wsKeyValidator.cleanup();
Mockito.verify(wsDataStore, Mockito.times(1)).cleanup();
}
Aggregations