### Question:
TriplestoreStorage extends TripleBasedStorage { @Override public void commit() { if (metricResults.size() == 0) return; StringWriter results = new StringWriter(); RDFDataMgr.write(results, metricResults, Lang.NT); String update = "INSERT DATA {" + results.toString() + "}"; blockRequest.add(update); UpdateProcessor processor = UpdateExecutionFactory .createRemote(blockRequest, updateEndpoint, createHttpClient()); processor.execute(); blockRequest = new UpdateRequest(); } TriplestoreStorage(String endpoint, String updateEndpoint, String user, String pwd, String baseUri);  TriplestoreStorage(String endpoint, String updateEndpoint, String baseUri);  TriplestoreStorage(String endpoint, String updateEndpoint); @Override void commit(); @Override String toString();  }### Answer:
@Test public void metaTest() throws IOException{ fastServerContainer = new ServerMock(); fastServer = new ContainerServer(fastServerContainer); fastConnection = new SocketConnection(fastServer); SocketAddress address1 = new InetSocketAddress(FAST_SERVER_PORT); fastConnection.connect(address1); String host = "http: TriplestoreStorage store = new TriplestoreStorage(host, host); Properties p = new Properties(); p.put(COMMON.EXPERIMENT_TASK_ID_KEY, "1/1/1"); p.setProperty(COMMON.EXPERIMENT_ID_KEY, "1/1"); p.setProperty(COMMON.CONNECTION_ID_KEY, "virtuoso"); p.setProperty(COMMON.SUITE_ID_KEY, "1"); p.setProperty(COMMON.DATASET_ID_KEY, "dbpedia"); p.put(COMMON.EXPERIMENT_TASK_CLASS_ID_KEY, "ClassName"); p.put(COMMON.RECEIVE_DATA_START_KEY, "true"); p.put(COMMON.EXTRA_META_KEY, new Properties()); p.put(COMMON.NO_OF_QUERIES, 2); store.addMetaData(p); store.commit(); assertEquals(metaExp.trim(), fastServerContainer.getActualContent().trim().replaceAll("[0-9][0-9][0-9][0-9]\\-[0-9][0-9]\\-[0-9][0-9]T[0-9][0-9]\\:[0-9][0-9]\\:[0-9][0-9]\\.[0-9]+Z", "???")); }
@Test public void dataTest() throws IOException{ fastServerContainer = new ServerMock(); fastServer = new ContainerServer(fastServerContainer); fastConnection = new SocketConnection(fastServer); SocketAddress address1 = new InetSocketAddress(FAST_SERVER_PORT); fastConnection.connect(address1); String host = "http: TriplestoreStorage store = new TriplestoreStorage(host, host); Model m = ModelFactory.createDefaultModel(); m.add(ResourceFactory.createResource(COMMON.RES_BASE_URI+"a"), ResourceFactory.createProperty(COMMON.PROP_BASE_URI+"b") , "c"); store.addData(m); store.commit(); assertEquals(dataExp.trim(),fastServerContainer.getActualContent().trim()); }