ChannelNotificationExpression { public String notification(List<String> propertyValues) { StringBuilder builder = new StringBuilder(); int n = 0; for (n = 0; n < requiredProperties.size(); n++) { builder.append(textTokens.get(n)).append(propertyValues.get(n)); } builder.append(textTokens.get(n)); return builder.toString(); } ChannelNotificationExpression(String notificationString); List<String> getRequiredProperties(); String notification(List<String> propertyValues); String notification(Map<String, String> map); String notification(Channel channel); String notification(Collection<Channel> channels);  }
@Test public void propMultipleChannel1() { Set<Channel> channels = new HashSet<Channel>(); channels.add(Channel.Builder.channel("channel1").with(property("same").value("value")) .with(property("different").value("value1")).build()); channels.add(Channel.Builder.channel("channel2").with(property("same").value("value")) .with(property("different").value("value2")).build()); ChannelNotificationExpression string = new ChannelNotificationExpression("#(same)"); assertEquals(string.notification(channels), "value"); string = new ChannelNotificationExpression("#(different)"); assertEquals(string.notification(channels), ""); string = new ChannelNotificationExpression("#(Channel Name)"); assertEquals(string.notification(channels), ""); }