BitmessageContext { public BitmessageAddress createChan(String passphrase) { BitmessageAddress chan = BitmessageAddress.chan(1, passphrase); ctx.getAddressRepository().save(chan); return chan; } 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 ensureChanIsCreated() { BitmessageAddress chan = ctx.createChan("test"); assertNotNull(chan); assertEquals(chan.getVersion(), Pubkey.LATEST_VERSION); assertTrue(chan.isChan()); }