try {
AuthenticationToken token = new PasswordToken(password);
if (mock == null || !mock.equals("true")) {
String instance = DataStoreFactory.findProperty(properties, this, INSTANCE_NAME_PROPERTY, null);
String zookeepers = DataStoreFactory.findProperty(properties, this, ZOOKEEPERS_NAME_PROPERTY, null);
credentials = new TCredentials(user,
"org.apache.accumulo.core.client.security.tokens.PasswordToken",
ByteBuffer.wrap(password.getBytes()), instance);
conn = new ZooKeeperInstance(instance, zookeepers).getConnector(user, token);
} else {
conn = new MockInstance().getConnector(user, new PasswordToken(password));
credentials = new TCredentials(user,
"org.apache.accumulo.core.client.security.tokens.PasswordToken",
ByteBuffer.wrap(password.getBytes()), conn.getInstance().getInstanceID());
}
if (autoCreateSchema)