BitmessageContext { public BitmessageAddress createIdentity(boolean shorter, Feature... features) { final BitmessageAddress identity = new BitmessageAddress(new PrivateKey( shorter, ctx.getStreams()[0], NETWORK_NONCE_TRIALS_PER_BYTE, NETWORK_EXTRA_BYTES, features )); ctx.getAddressRepository().save(identity); if (sendPubkeyOnIdentityCreation) { ctx.sendPubkey(identity, identity.getStream()); } return identity; } private  BitmessageContext(Builder builder); AddressRepository addresses(); MessageRepository messages(); Labeler labeler(); BitmessageAddress createIdentity(boolean shorter, Feature... features); BitmessageAddress joinChan(String passphrase, String address); BitmessageAddress createChan(String passphrase); List<BitmessageAddress> createDeterministicAddresses(
        String passphrase, int numberOfAddresses, long version, long stream, boolean shorter); void broadcast(final BitmessageAddress from, final String subject, final String message); void send(final BitmessageAddress from, final BitmessageAddress to, final String subject, final String message); void send(final Plaintext msg); void startup(); void shutdown(); void synchronize(InetAddress host, int port, long timeoutInSeconds, boolean wait); CustomMessage send(InetAddress server, int port, CustomMessage request); void cleanup(); void resendUnacknowledgedMessages(); boolean isRunning(); void addContact(BitmessageAddress contact); void addSubscribtion(BitmessageAddress address); Property status(); InternalContext internals(); static final int CURRENT_VERSION; }
@Test public void ensureIdentityIsCreated() { assertThat(ctx.createIdentity(false), notNullValue()); }