public static Connector initConnector() {
    Instance instance = new MockInstance();

    try {
      Connector connector = instance.getConnector("root", "password".getBytes());

      // set up table
      connector.tableOperations().create("partition");

      // set up root's auths
      connector
          .securityOperations()
          .changeUserAuthorizations("root", new Authorizations("ALPHA,BETA,GAMMA".split(",")));

      return connector;
    } catch (CBException e) {
      e.printStackTrace();
    } catch (CBSecurityException e) {
      e.printStackTrace();
    } catch (TableExistsException e) {
      e.printStackTrace();
    }

    return null;
  }