private Map<String, Collection<Partition>> toPartitionsMap(String topic, Iterable<Integer> partitionIds) {
		List<Partition> partitions = new ArrayList<Partition>();
		for (Integer partitionId : partitionIds) {
			partitions.add(new Partition(topic, partitionId));
		}
		Map<String, Collection<Partition>> partitionsMap = new HashMap<String, Collection<Partition>>();
		partitionsMap.put(topic, partitions);
		return partitionsMap;
	}
@param topic the topic name which is the key for the map
@param partitionIds the partition Ids to map
@return the map of {@ref Partition} collections for the given topic.
extensions/spring-xd-extension-kafka/src/main/java/org/springframework/integration/x/kafka/KafkaPartitionAllocator.java