### Question:
HttpCollector implements ServiceCollector { @Override public CollectionSet collect(CollectionAgent agent, EventProxy eproxy, Map<String, Object> parameters) { HttpCollectionSet collectionSet = new HttpCollectionSet(agent, parameters); collectionSet.setCollectionTimestamp(new Date()); collectionSet.collect(); return collectionSet; }  @Override CollectionSet collect(CollectionAgent agent, EventProxy eproxy, Map<String, Object> parameters); @Override void initialize(Map<String, String> parameters); @Override void initialize(CollectionAgent agent, Map<String, Object> parameters); @Override void release(); @Override void release(CollectionAgent agent); @Override RrdRepository getRrdRepository(String collectionName);  }### Answer:
@Test @JUnitHttpServer(port=10342, vhosts={"127.0.0.1"}) @JUnitCollector(datacollectionConfig="/org/opennms/netmgt/config/http-datacollection-config.xml", datacollectionType="http", anticipateRrds={ "1/documentCount", "1/greatAnswer", "1/someNumber" }, anticipateFiles={ "1/strings.properties" }) public final void testCollect() throws Exception { m_collectionSpecification.initialize(m_collectionAgent); CollectionSet collectionSet = m_collectionSpecification.collect(m_collectionAgent); assertEquals("collection status", ServiceCollector.COLLECTION_SUCCEEDED, collectionSet.getStatus()); CollectorTestUtils.persistCollectionSet(m_collectionSpecification, collectionSet); m_collectionSpecification.release(m_collectionAgent); }