AmcHelper { public Connector getConnector() { Instance instance = new ZooKeeperInstance(amc.getInstanceName(), amc.getZooKeepers()); Connector conn = null; try { conn = instance.getConnector("root", new PasswordToken("password")); } catch (AccumuloException|AccumuloSecurityException e) { e.printStackTrace(); } Authorizations auth = new Authorizations(AccumuloIdentifiers.AUTHORIZATION.toString()); try { conn.securityOperations().changeUserAuthorizations("root", auth); } catch (AccumuloException|AccumuloSecurityException e) { e.printStackTrace(); } return conn; }  MiniAccumuloCluster startMiniCluster(String tempStr); MiniAccumuloCluster startMiniCluster(File tempFile); Connector getConnector(); void stopMiniCluster();  }
@Test public void testAmc() throws TableExistsException, AccumuloSecurityException, AccumuloException, TableNotFoundException { Connector conn = amc.getConnector(); System.out.println("I am connected as: " + conn.whoami()); conn.tableOperations().create("TestTable"); Mutation m1 = new Mutation("row1"); String testString = "42"; m1.put("CF", "CQ", testString); BatchWriter bw = conn.createBatchWriter("TestTable", new BatchWriterConfig()); bw.addMutation(m1); bw.close(); Scanner s = conn.createScanner("TestTable", new Authorizations("standard")); for(Map.Entry<Key, Value> entry: s){ System.out.println(entry.getKey()); System.out.println(entry.getValue()); assertEquals(entry.getValue().toString(), testString); } s.close(); }