### Question:
JpaDataStore implements DataStore { @Override public void removeChannels(final Set<String> channelIds) { if (channelIds == null || channelIds.isEmpty()) { return; } final JpaOperation<Integer> removeChannel = new JpaOperation<Integer>() { @Override public Integer perform(EntityManager em) { final Query delete = em.createQuery("DELETE from ChannelDTO c where c.channelId in (:channelIds)"); delete.setParameter("channelIds", channelIds); return delete.executeUpdate(); } }; jpaExecutor.execute(removeChannel); } JpaDataStore(final String persistenceUnit); @Override void savePrivateKeySalt(final byte[] salt); @Override byte[] getPrivateKeySalt(); @Override boolean saveChannel(final Channel channel); @Override Channel getChannel(final String channelId); @Override void removeChannels(final Set<String> channelIds); @Override Set<String> getChannelIds(final String uaid); @Override void removeChannels(final String uaid); @Override String updateVersion(final String endpointToken, final long version); @Override String saveUnacknowledged(final String channelId, final long version); @Override Set<Ack> getUnacknowledged(final String uaid); @Override Set<Ack> removeAcknowledged(final String uaid, final Set<Ack> acked);  }### Answer:
@Test public void removeChannels() { final String uaid = UUIDUtil.newUAID(); final String channelId1 = UUID.randomUUID().toString(); final String channelId2 = UUID.randomUUID().toString(); jpaDataStore.saveChannel(newChannel(uaid, channelId1, 10L)); jpaDataStore.saveChannel(newChannel(uaid, channelId2, 10L)); jpaDataStore.removeChannels(uaid); assertThat(channelExists(channelId1, jpaDataStore), is(false)); }
@Test public void removeChannelsNoUserAgentStored() { final String channelId1 = UUID.randomUUID().toString(); jpaDataStore.removeChannels(UUIDUtil.newUAID()); assertThat(channelExists(channelId1, jpaDataStore), is(false)); }