@Test
public void testDecodingUserDetailsService() throws Exception {
GeoServerUserGroupService service = createUserGroupService("test");
DecodingUserDetailsService decService = DecodingUserDetailsService.newInstance(service);
GeoServerUserGroupStore store = createStore(service);
insertValues(store);
store.store();
String plainpassword = "geoserver";
UserDetails admin = service.loadUserByUsername(GeoServerUser.ADMIN_USERNAME);
assertFalse(plainpassword.equals(admin.getPassword()));
UserDetails admin2 = decService.loadUserByUsername(GeoServerUser.ADMIN_USERNAME);
assertTrue(plainpassword.equals(admin2.getPassword()));
}