private Collection<Topic> toTopics(String channels) {
String[] channelsArrays = channels.split(",");
List<Topic> topics = new ArrayList<Topic>();
for (String channel : channelsArrays) {
if (Command.PSUBSCRIBE.toString().equals(redisConfiguration.getCommand())) {
topics.add(new PatternTopic(channel));
} else if (Command.SUBSCRIBE.toString().equals(redisConfiguration.getCommand())) {
topics.add(new ChannelTopic(channel));
} else {
throw new RuntimeException("Unsupported Command");
}