JdbcAddressRepository extends JdbcHelper implements AddressRepository { @Override public void remove(BitmessageAddress address) { try ( Connection connection = config.getConnection(); Statement stmt = connection.createStatement() ) { stmt.executeUpdate("DELETE FROM Address WHERE address = '" + address.getAddress() + "'"); } catch (SQLException e) { LOG.error(e.getMessage(), e); } } 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 testRemove() throws Exception { BitmessageAddress address = repo.getAddress(IDENTITY_A); repo.remove(address); assertNull(repo.getAddress(IDENTITY_A)); }