### Question:
QueueingForeignSourceRepository implements ForeignSourceRepository, InitializingBean { @Override public Requisition getRequisition(final String foreignSourceName) throws ForeignSourceRepositoryException { return m_repository.getRequisition(foreignSourceName); } QueueingForeignSourceRepository(); @Override void flush(); @Override void afterPropertiesSet(); ForeignSourceRepository getForeignSourceRepository(); void setForeignSourceRepository(final ForeignSourceRepository fsr); @Override Set<String> getActiveForeignSourceNames(); @Override int getForeignSourceCount(); @Override Set<ForeignSource> getForeignSources(); @Override ForeignSource getForeignSource(final String foreignSourceName); @Override void save(final ForeignSource foreignSource); @Override void delete(final ForeignSource foreignSource); @Override Set<Requisition> getRequisitions(); @Override Requisition getRequisition(final String foreignSourceName); @Override Requisition getRequisition(final ForeignSource foreignSource); @Override Date getRequisitionDate(final String foreignSource); @Override URL getRequisitionURL(final String foreignSource); @Override void save(final Requisition requisition); @Override void delete(final Requisition requisition); @Override ForeignSource getDefaultForeignSource(); @Override void putDefaultForeignSource(final ForeignSource foreignSource); @Override void resetDefaultForeignSource(); @Override Requisition importResourceRequisition(final Resource resource); @Override OnmsNodeRequisition getNodeRequisition(final String foreignSource, final String foreignId); @Override void validate(final ForeignSource foreignSource); @Override void validate(final Requisition requisition);  }### Answer:
@Test public void testRequisition() throws Exception { createRequisition(); Requisition r = m_foreignSourceRepository.getRequisition(m_defaultForeignSourceName); TestVisitor v = new TestVisitor(); r.visit(v); assertEquals("number of nodes visited", 2, v.getNodeReqs().size()); assertEquals("node name matches", "apknd", v.getNodeReqs().get(0).getNodeLabel()); }
@Test public void testGetRequisition() throws Exception { Requisition requisition = createRequisition(); ForeignSource foreignSource = createForeignSource(m_defaultForeignSourceName); assertRequisitionsMatch("requisitions must match", m_foreignSourceRepository.getRequisition(m_defaultForeignSourceName), m_foreignSourceRepository.getRequisition(foreignSource)); assertRequisitionsMatch("foreign source is the expected one", requisition, m_foreignSourceRepository.getRequisition(foreignSource)); }