### Question:
FileSecureStoreService extends AbstractIdleService implements SecureStoreService { @Override public List<SecureStoreMetadata> list(String namespace) throws Exception { checkNamespaceExists(namespace); readLock.lock(); try { Enumeration<String> aliases = keyStore.aliases(); List<SecureStoreMetadata> metadataList = new ArrayList<>(); String prefix = namespace + NAME_SEPARATOR; while (aliases.hasMoreElements()) { String alias = aliases.nextElement(); if (alias.startsWith(prefix)) { metadataList.add(getSecureStoreMetadata(alias)); } } return metadataList; } catch (KeyStoreException e) { throw new IOException("Failed to get the list of elements from the secure store.", e); } finally { readLock.unlock(); } } @Inject  FileSecureStoreService(CConfiguration cConf, SConfiguration sConf, NamespaceQueryAdmin namespaceQueryAdmin); @Override void put(String namespace, String name, String data, @Nullable String description,
                  Map<String, String> properties); @Override void delete(String namespace, String name); @Override List<SecureStoreMetadata> list(String namespace); @Override SecureStoreData get(String namespace, String name);  }### Answer:
@Test public void testListEmpty() throws Exception { Assert.assertEquals(Collections.emptyList(), secureStore.list(NAMESPACE1)); }
@Test public void testList() throws Exception { populateStore(); List<SecureStoreMetadata> metadatas = secureStore.list(NAMESPACE1); metadatas.sort(Comparator.comparing(SecureStoreMetadata::getName)); verifyList(metadatas, ImmutableMap.of(KEY1, DESCRIPTION1, KEY2, DESCRIPTION2)); }