### Question:
AbstractMuxConnection extends AbstractBlobStoreConnection { @Override public Iterator<URI> listBlobIds(String filterPrefix) throws IOException { List<Iterator<URI>> iterators = new ArrayList<Iterator<URI>>(); for (BlobStore store : getStores(filterPrefix)) iterators.add(getConnection(store, null).listBlobIds(filterPrefix)); return Iterators.concat(iterators.iterator()); } AbstractMuxConnection(BlobStore store, Transaction txn); abstract BlobStore getStore(URI blobId, Map<String, String> hints); Set<BlobStore> getStores(String prefix); @Override void close(); @Override Blob getBlob(URI blobId, Map<String, String> hints); @Override Iterator<URI> listBlobIds(String filterPrefix); @Override void sync();  }### Answer:
@Test public void testListBlobIds() throws IOException { for (Iterator<URI> it = con.listBlobIds(null); it.hasNext();) con.getBlob(it.next(), null).delete(); assertFalse(con.listBlobIds(null).hasNext()); Blob b1 = con.getBlob(null, s1Hint); Blob b2 = con.getBlob(null, s2Hint); b1.openOutputStream(0, true).close(); b2.openOutputStream(0, true).close(); Set<Blob> blobs = new HashSet<Blob>(); for (Iterator<URI> it = con.listBlobIds(null); it.hasNext();) blobs.add(con.getBlob(it.next(), null)); assertEquals(2, blobs.size()); assertTrue(blobs.contains(b1)); assertTrue(blobs.contains(b2)); for (Blob b : new Blob[] { b1, b2 }) { blobs = new HashSet<Blob>(); for (Iterator<URI> it = con.listBlobIds(b.getId().toString()); it.hasNext();) blobs.add(con.getBlob(it.next(), null)); assertEquals(1, blobs.size()); assertTrue(blobs.contains(b)); } }