### Question:
AuthScopeRdbmsDao extends AuthScopeDao { @Override public void update(String scopeName, List<String> userGroups) throws AuthServerException { Connection connection = null; try { connection = getConnection(); deleteGroups(scopeName, connection); persistGroups(scopeName, userGroups, connection); connection.commit(); } catch (SQLException e) { throw new AuthServerException("Error occurred while updating groups for scope name : " + scopeName, e); } finally { close(connection); } } AuthScopeRdbmsDao(DataSource dataSource); @Override AuthScope read(String scopeName); @Override List<AuthScope> readAll(); @Override void update(String scopeName, List<String> userGroups);  }### Answer:
@Test public void testUpdate() throws AuthServerException { AuthScope authScope = authScopeDao.read("queues:test"); Assert.assertEquals(authScope.getScopeName(), "queues:test"); Assert.assertEquals(authScope.getUserGroups().size(), 1); authScopeDao.update("queues:test", Arrays.asList("developer", "manager")); authScope = authScopeDao.read("queues:test"); Assert.assertEquals(authScope.getScopeName(), "queues:test"); Assert.assertEquals(authScope.getUserGroups().size(), 2); }