@Test(expected = IllegalArgumentException.class)
 public void testAfterPropertiesSetEmptyMap() throws Exception {
   MapBasedAttributes2GrantedAuthoritiesMapper mapper =
       new MapBasedAttributes2GrantedAuthoritiesMapper();
   mapper.setAttributes2grantedAuthoritiesMap(new HashMap());
   mapper.afterPropertiesSet();
 }
 private MapBasedAttributes2GrantedAuthoritiesMapper getDefaultMapper() throws Exception {
   MapBasedAttributes2GrantedAuthoritiesMapper mapper =
       new MapBasedAttributes2GrantedAuthoritiesMapper();
   mapper.setAttributes2grantedAuthoritiesMap(getValidAttributes2GrantedAuthoritiesMap());
   mapper.afterPropertiesSet();
   return mapper;
 }
 @Test
 public void testAfterPropertiesSetValidMap() throws Exception {
   MapBasedAttributes2GrantedAuthoritiesMapper mapper =
       new MapBasedAttributes2GrantedAuthoritiesMapper();
   HashMap m = getValidAttributes2GrantedAuthoritiesMap();
   mapper.setAttributes2grantedAuthoritiesMap(m);
   mapper.afterPropertiesSet();
 }
 @Test(expected = IllegalArgumentException.class)
 public void testAfterPropertiesSetInvalidValueTypeMap2() throws Exception {
   MapBasedAttributes2GrantedAuthoritiesMapper mapper =
       new MapBasedAttributes2GrantedAuthoritiesMapper();
   HashMap m = new HashMap();
   m.put("role1", new Object[] {new String[] {"ga1", "ga2"}, new Object()});
   mapper.setAttributes2grantedAuthoritiesMap(m);
   mapper.afterPropertiesSet();
 }
 @Test(expected = IllegalArgumentException.class)
 public void testAfterPropertiesSetInvalidKeyTypeMap() throws Exception {
   MapBasedAttributes2GrantedAuthoritiesMapper mapper =
       new MapBasedAttributes2GrantedAuthoritiesMapper();
   HashMap m = new HashMap();
   m.put(new Object(), "ga1");
   mapper.setAttributes2grantedAuthoritiesMap(m);
   mapper.afterPropertiesSet();
 }