final int invoked[] = new int[1];
SecurityEnhancer test = new AbstractSecurityEnhancer() {
@Override
protected SecurityEnhancerResult doBulkEnhance(SecurityEnhancerRequest request) {
invoked[0]++;
return new SecurityEnhancerResult(request.getSecurities());
}
};
SecurityEnhancerRequest request = SecurityEnhancerRequest.create(SECURITY1, SECURITY2);
SecurityEnhancerResult result = test.enhanceSecurities(request);
assertEquals(Arrays.asList(SECURITY1, SECURITY2), result.getResultList());
assertEquals(1, invoked[0]);
}