### Question:
AuthResourceRdbmsDao implements AuthResourceDao { @Override public AuthResource read(String resourceType, String resourceName) throws AuthServerException { return selectOperation(connection -> authResourceCrudOperationsDao.read(connection, resourceType, resourceName)); } AuthResourceRdbmsDao(DataSource dataSource); @Override void persist(AuthResource authResource); @Override void update(AuthResource authResource); @Override boolean delete(String resourceType, String resource); @Override AuthResource read(String resourceType, String resourceName); @Override List<AuthResource> readAll(String resourceType, String ownerId); @Override List<AuthResource> readAll(String resourceType, String action, String ownerId,
                                      List<String> userGroups); @Override boolean isExists(String resourceType, String resource); @Override boolean updateOwner(String resourceType, String resourceName, String newOwner); @Override boolean addGroups(String resourceType, String resourceName, String action, List<String> groups); @Override boolean removeGroup(String resourceType, String resourceName, String action, String group);  }### Answer:
@Test public void testRead() throws AuthServerException { AuthResource queue = authResourceDao.read(ResourceType.QUEUE.toString(), "queue1"); Assert.assertEquals(queue.getOwner(), "customer"); Assert.assertEquals(queue.getActionsUserGroupsMap().size(), 0); AuthResource exchange = authResourceDao.read(ResourceType.EXCHANGE.toString(), "exchange1"); Assert.assertEquals(exchange.getOwner(), "manager"); AuthResource exchange2 = authResourceDao.read(ResourceType.EXCHANGE.toString(), "exchange2"); Assert.assertEquals(exchange.getOwner(), "manager"); Assert.assertEquals(exchange2.getOwner(), "manager"); Assert.assertEquals(exchange.getActionsUserGroupsMap().get("bind").size(), 2); Assert.assertEquals(exchange2.getActionsUserGroupsMap().get("bind").size(), 1); }