@Test
public void rolesAllowed() throws ConfigurationException, SecurityServiceException
{
Builder builder = new SecurityConfig.Builder("SuccessfulLogin");
builder.runAs("esbRole");
builder.rolesAllowed("esbRole");
SecurityConfig configInfo = builder.build();
SecurityContext context = new SecurityContext(subject, SecurityContext.getConfigurationTimeout());
service.authenticate( configInfo, context, null );
boolean checkRolesAllowed = service.checkRolesAllowed(configInfo.getRolesAllowed(), context);
assertTrue(checkRolesAllowed);