static String readAll(MiniAccumuloCluster c, Class<? extends Object> klass, Process p)
     throws Exception {
   for (LogWriter writer : c.getLogWriters()) writer.flush();
   return readAll(
       new FileInputStream(
           c.getConfig().getLogDir() + "/" + klass.getSimpleName() + "_" + p.hashCode() + ".out"));
 }
  private static void cleanup() throws IOException, InterruptedException {

    try {
      accumulo.stop();
    } finally {
      FileUtils.deleteDirectory(tempAccumuloDir);
    }
  }
  private static void setup()
      throws AccumuloException, AccumuloSecurityException, IOException, InterruptedException {

    final String ACCUMULO_USER = "root";
    final String ACCUMULO_PASSWORD = "Ge0wave";
    final String TABLE_NAMESPACE = "";

    tempAccumuloDir = Files.createTempDir();

    accumulo = new MiniAccumuloCluster(new MiniAccumuloConfig(tempAccumuloDir, ACCUMULO_PASSWORD));

    accumulo.start();

    dataStore =
        new AccumuloDataStore(
            new BasicAccumuloOperations(
                accumulo.getZooKeepers(),
                accumulo.getInstanceName(),
                ACCUMULO_USER,
                ACCUMULO_PASSWORD,
                TABLE_NAMESPACE));
  }