### Question:
ArchonStorage { public List<String> getShardIDs() throws Exception{ PreparedStatement stmt = null; ArrayList<String> ids = new ArrayList<String>(); try { stmt = connection.prepareStatement(selectShardIDsQuery); ResultSet rs = stmt.executeQuery(); while(rs.next()){ String shardIdStr= rs.getString(SHARD_ID_COLUMN); ids.add(""+shardIdStr); } } catch (SQLException e) { log.error("SQL Exception in getShardIDs():" + e.getMessage()); throw e; } finally { closeStatement(stmt); } return ids; } ArchonStorage(); static void initialize(String driverName, String driverUrl, String userName, String password); int nextShardId(); void addARC(String arcPath); void addOrUpdateARC(String arcPath); List<String> getShardIDs(); String nextARC(String shardID); List<String> getARCFiles(String shardID); ArcVO getArcByID(String arcID); int getArcCount(); List<ArcVO> getLatest1000Arcs(); List<ArcVO> getAllRunningArcs(); void setARCState(String arcPath, ArchonConnector.ARC_STATE arcState); void setShardState(String shardID, ArchonConnector.ARC_STATE state, int priority); void setARCProperties(String fullPath, String shardID,ArchonConnector.ARC_STATE state, int priority); void setARCPriority(String fullPath, int priority); void resetArcWithPriorityStatement(String fullPath, int priority); void removeARC(String arcID); void clearIndexing(String shardID); void resetShardId(String shardID); void commit(); void rollback(); void close(); static void shutdown(); static Date INITDATE; }### Answer:
@Test public void testGetShardIDs() throws Exception { List<String> ids = storage.getShardIDs(); assertEquals(0, ids.size()); storage.addARC(arcFile1); ids = storage.getShardIDs(); assertEquals(0, ids.size()); storage.setARCProperties(arcFile1, "1",ArchonConnector.ARC_STATE.NEW, 1); ids = storage.getShardIDs(); assertEquals(1, ids.size()); assertEquals("1", ids.get(0)); storage.addARC(arcFile2); assertEquals(1, ids.size()); storage.setARCProperties(arcFile2, "2", ArchonConnector.ARC_STATE.NEW, 1); ids = storage.getShardIDs(); assertEquals(2, ids.size()); }