this.authVm.refresh();
// Read / modify the one existing user
Assert.assertEquals(1, this.authVm.getUserInfos().size());
UserInfo u1 = this.authVm.getUserInfos().get(0);
Assert.assertEquals("user1", u1.getName());
TestUtils.assertCollectionEquals(this.authVm.getUserInfos(), u1);
Assert.assertEquals(3, u1.getRoles().size());
Assert.assertFalse(u1.hasChanged());
MemoryBooleanProperty p1 = u1.getRoles().get("role1");
Assert.assertTrue(p1.get());
Assert.assertFalse(p1.hasChanged());
Assert.assertFalse(this.authVm.hasRolesChanged());
p1.set(false);
Assert.assertTrue(p1.hasChanged());
Assert.assertTrue(u1.hasChanged());
Assert.assertTrue(this.authVm.hasRolesChanged());
MemoryBooleanProperty p2 = u1.getRoles().get("newRole");
p2.set(true);
this.authVm.save();
Assert.assertFalse(this.authVm.hasRolesChanged());
UserInfo u1New = this.authVm.getUserInfos().get(0);
Assert.assertFalse(u1New.getRoles().get("role1").get());
Assert.assertTrue(u1New.getRoles().get("newRole").get());
}