### Question:
CouchDBDataStore implements DataStore { @Override public boolean saveChannel(final Channel channel) { db.create(channelAsMap(channel)); return true; } CouchDBDataStore(final String url, final String dbName); @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 String uaid); @Override void removeChannels(final Set<String> channelIds); @Override Set<String> getChannelIds(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 saveChannel() { final Channel channel = newChannel(UUIDUtil.newUAID(), UUID.randomUUID().toString()); final boolean saved = datastore.saveChannel(channel); assertThat(saved, is(true)); }
@Test public void saveChannelWithIdContainingUnderscore() { final String uaid = UUIDUtil.newUAID(); final String channelId = UUID.randomUUID().toString(); final byte[] keySalt = "some string as a salt".getBytes(); final String endpointToken = CryptoUtil.endpointToken(uaid, channelId, CryptoUtil.secretKey("testKey", keySalt)); final Channel channel = new DefaultChannel(uaid, channelId, "_" + endpointToken); final boolean saved = datastore.saveChannel(channel); assertThat(saved, is(true)); }