### Question:
JdbcMetrics extends AbstractJdbcComponent implements IMetrics { @Override public void record(RequestMetric metric) { try { queue.put(metric); } catch (Exception e) { e.printStackTrace(); } } JdbcMetrics(Map<String, String> config); @Override void record(RequestMetric metric); @Override void setComponentRegistry(IComponentRegistry registry);  }### Answer:
@Test public void testRecord() throws Exception { Map<String, String> config = new HashMap<>(); config.put("datasource.jndi-location", DB_JNDI_LOC); JdbcMetrics metrics = new JdbcMetrics(config); metrics.record(request( "2016-02-10T09:30:00Z", 300, "http: "GET", "TestOrg", "TestApi", "1.0", "Gold", "TestOrg", "TestClient", "1.0", "12345", "user1", 200, "OK", false, 0, null, false, null, 0, 1024)); Thread.sleep(200); assertRowCount(1, "SELECT * FROM gw_requests WHERE api_org_id = ?", "TestOrg"); metrics.stop(); }