JdbcAddressRepository extends JdbcHelper implements AddressRepository { @Override public List<BitmessageAddress> getIdentities() { return find("private_key IS NOT NULL"); } JdbcAddressRepository(JdbcConfig config); @Override BitmessageAddress findContact(byte[] ripeOrTag); @Override BitmessageAddress findIdentity(byte[] ripeOrTag); @Override List<BitmessageAddress> getIdentities(); @Override List<BitmessageAddress> getChans(); @Override List<BitmessageAddress> getSubscriptions(); @Override List<BitmessageAddress> getSubscriptions(long broadcastVersion); @Override List<BitmessageAddress> getContacts(); @Override void save(BitmessageAddress address); @Override void remove(BitmessageAddress address); @Override BitmessageAddress getAddress(String address);  }
@Test public void testGetIdentities() throws Exception { List<BitmessageAddress> identities = repo.getIdentities(); assertEquals(2, identities.size()); for (BitmessageAddress identity : identities) { assertNotNull(identity.getPrivateKey()); } }