### Question:
ResourceGroupAOImpl extends IRODSGenericAO implements ResourceGroupAO { @Override public List<String> listResourceGroupNames() throws JargonException { List<String> resourceNames = new ArrayList<String>(); if (getIRODSServerProperties().isAtLeastIrods410()) { log.info("resource groups are not supported post iRODS4, simply list parent resources"); ResourceAO resourceAO = getIRODSAccessObjectFactory().getResourceAO(getIRODSAccount()); return resourceAO.listResourceNames(); } AbstractIRODSQueryResultSet resultSet = null; try { IRODSGenQueryBuilder builder = new IRODSGenQueryBuilder(true, null); builder.addSelectAsGenQueryValue(RodsGenQueryEnum.COL_RESC_GROUP_NAME) .addOrderByGenQueryField(RodsGenQueryEnum.COL_RESC_GROUP_NAME, OrderByType.ASC); IRODSGenQueryExecutor irodsGenQueryExecutor = getIRODSAccessObjectFactory() .getIRODSGenQueryExecutor(getIRODSAccount()); resultSet = irodsGenQueryExecutor.executeIRODSQueryAndCloseResult(builder.exportIRODSQueryFromBuilder( getIRODSAccessObjectFactory().getJargonProperties().getMaxFilesAndDirsQueryMax()), 0); } catch (JargonQueryException e) { log.error("jargon query exception getting results", e); throw new JargonException(e); } catch (GenQueryBuilderException e) { log.error("jargon query exception getting results", e); throw new JargonException(e); } for (IRODSQueryResultRow row : resultSet.getResults()) { resourceNames.add(row.getColumn(0)); } return resourceNames; } protected  ResourceGroupAOImpl(final IRODSSession irodsSession, final IRODSAccount irodsAccount); @Override List<String> listResourceGroupNames();  }### Answer:
@Test public final void testListResourceGroupNames() throws Exception { IRODSAccount irodsAccount = testingPropertiesHelper.buildIRODSAccountFromTestProperties(testingProperties); IRODSAccessObjectFactory accessObjectFactory = irodsFileSystem.getIRODSAccessObjectFactory(); ResourceGroupAO resourceGroupAO = accessObjectFactory.getResourceGroupAO(irodsAccount); List<String> resources = resourceGroupAO.listResourceGroupNames(); Assert.assertTrue("no resources returned", resources.size() > 0); }