### Question:
FasterFilesystemForeignSourceRepository extends AbstractForeignSourceRepository implements InitializingBean { public int getForeignSourceCount() throws ForeignSourceRepositoryException { m_readLock.lock(); try { return m_foreignSources.getBaseNamesWithExtension(".xml").size(); } finally { m_readLock.unlock(); } } FasterFilesystemForeignSourceRepository(); @Override void afterPropertiesSet(); Set<String> getActiveForeignSourceNames(); int getForeignSourceCount(); Set<ForeignSource> getForeignSources(); ForeignSource getForeignSource(final String foreignSourceName); void save(final ForeignSource foreignSource); void delete(final ForeignSource foreignSource); Set<Requisition> getRequisitions(); Requisition getRequisition(final String foreignSourceName); Requisition getRequisition(final ForeignSource foreignSource); void save(final Requisition requisition); void delete(final Requisition requisition); void setRequisitionPath(final String path); void setForeignSourcePath(final String path); @Override Date getRequisitionDate(final String foreignSource); @Override URL getRequisitionURL(final String foreignSource); @Override void flush();  }### Answer:
@Test public void testGetForeignSourceCount() throws Exception { FileSystemBuilder bldr = new FileSystemBuilder("target", "testGetForeignSourceCount"); File fsDir = bldr.dir("foreignSource").file("test.xml", fs("test")).file("noreq.xml", fs("noreq")).file("another.xml", fs("another")).pop(); File reqDir = bldr.dir("requisitions").file("test.xml").file("pending.xml").pop(); FasterFilesystemForeignSourceRepository repo = repo(fsDir, reqDir); assertEquals(3, repo.getForeignSourceCount()); }