### Question:
MulgaraConnector extends TriplestoreConnector { @Override public TriplestoreWriter getWriter() { if (m_reader == null){ try{ open(); } catch(TrippiException e){ logger.error(e.toString(),e); } } if (m_writer == null) { throw new UnsupportedOperationException( "This MulgaraConnector is read-only!"); } else { return m_writer; } }  @Override void close(); @Override GraphElementFactory getElementFactory(); @Override TriplestoreReader getReader(); @Override TriplestoreWriter getWriter(); @Deprecated @Override void init(Map<String, String> config); @Override void setConfiguration(Map<String, String> config); @Override void setTripleIteratorFactory(TripleIteratorFactory factory); @Override Map<String,String> getConfiguration(); @Override void open();  }### Answer:
@Test public void testGetWriter() throws Exception { List<Triple> triples = new ArrayList<Triple>(); triples.add(getTriple("foo", "bar", "baz")); TriplestoreWriter writer = _connector.getWriter(); writer.add(triples, true); assertEquals(1, writer.countTriples(null, null, null, 10)); writer.delete(triples, true); assertEquals(0, writer.countTriples(null, null, null, 10)); writer.close(); }