### Question:
ColumnPartitionMetadata { public static Set<Integer> extractPartitions(List partitionList) { Set<Integer> partitions = new HashSet<>(); for (Object o : partitionList) { String partitionString = o.toString(); if (partitionString.charAt(0) == '[') { addRangeToPartitions(partitionString, partitions); } else { partitions.add(Integer.parseInt(partitionString)); } } return partitions; } ColumnPartitionMetadata(String functionName, int numPartitions, Set<Integer> partitions); String getFunctionName(); int getNumPartitions(); Set<Integer> getPartitions(); @Override boolean equals(Object obj); @Override int hashCode(); static Set<Integer> extractPartitions(List partitionList);  }### Answer:
@Test public void testLegacyPartitionRangesConfig() { PropertiesConfiguration config = new PropertiesConfiguration(); config.setProperty("partitionRanges", LEGACY_PARTITION_RANGES_STRING); Set<Integer> actual = ColumnPartitionMetadata.extractPartitions(config.getList("partitionRanges")); assertEquals(actual, PARTITIONS); }
@Test public void testPartitionsConfig() { PropertiesConfiguration config = new PropertiesConfiguration(); config.setProperty("partitions", PARTITIONS); Set<Integer> actual = ColumnPartitionMetadata.extractPartitions(config.getList("partitions")); assertEquals(actual, PARTITIONS); }