### Question:
SimpleAuthorizingInterceptor extends AbstractAuthorizingInInterceptor { public void setMethodRolesMap(Map<String, String> rolesMap) { methodRolesMap.putAll(parseRolesMap(rolesMap)); } SimpleAuthorizingInterceptor();  SimpleAuthorizingInterceptor(boolean uniqueId); void setMethodRolesMap(Map<String, String> rolesMap); void setUserRolesMap(Map<String, String> rolesMap); void setGlobalRoles(String roles); void setCheckConfiguredRolesOnly(boolean checkConfiguredRolesOnly);  }### Answer:
@Test(expected = AccessDeniedException.class) public void testNoSecurityContextAnonymousUserRoles() { message.put(SecurityContext.class, null); SimpleAuthorizingInterceptor in = createSimpleAuthorizingInterceptor(); in.setMethodRolesMap(Collections.singletonMap("echo", "role1 testRole")); in.handleMessage(message); }
@Test public void testPermitWithMethodRoles() { SimpleAuthorizingInterceptor in = createSimpleAuthorizingInterceptor(); in.setMethodRolesMap(Collections.singletonMap("echo", "role1 testRole")); in.handleMessage(message); }
@Test public void testPermitAll() { SimpleAuthorizingInterceptor in = createSimpleAuthorizingInterceptor(); in.setMethodRolesMap(Collections.singletonMap("echo", "*")); in.handleMessage(message); }
@Test(expected = AccessDeniedException.class) public void testDenyWithMethodRoles() { SimpleAuthorizingInterceptor in = createSimpleAuthorizingInterceptor(); in.setMethodRolesMap(Collections.singletonMap("echo", "role1 role2")); in.handleMessage(message); }