Source:
<code>public void clusterMapInterface() throws JSONException { TestUtils.TestHardwareLayout testHardwareLayout = new TestUtils.TestHardwareLayout("Alpha"); TestUtils.TestPartitionLayout testPartitionLayout = new TestUtils.TestPartitionLayout(testHardwareLayout); ClusterMapManager clusterMapManager = new ClusterMapManager(testPartitionLayout.getPartitionLayout()); for (String metricName : clusterMapManager.getMetricRegistry().getNames()) { System.out.println(metricName); } <START> List<? extends PartitionId> partitionIds = clusterMapManager.getWritablePartitionIds(); <END> assertEquals(partitionIds.size(), testPartitionLayout.getPartitionCount()); for (int i = 0; i < partitionIds.size(); i++) { PartitionId partitionId = partitionIds.get(i); assertEquals(partitionId.getReplicaIds().size(), testPartitionLayout.getReplicaCount()); DataInputStream partitionStream = new DataInputStream(new ByteBufferInputStream(ByteBuffer.wrap(partitionId.getBytes()))); try { PartitionId fetchedPartitionId = clusterMapManager.getPartitionIdFromStream(partitionStream); assertEquals(partitionId, fetchedPartitionId); } catch (IOException e) { assertEquals(true, false); } } for (Datacenter datacenter : testHardwareLayout.getHardwareLayout().getDatacenters()) { for (DataNode dataNode : datacenter.getDataNodes()) { DataNodeId dataNodeId = clusterMapManager.getDataNodeId(dataNode.getHostname(), dataNode.getPort()); assertEquals(dataNodeId, dataNode); for (ReplicaId replicaId : clusterMapManager.getReplicaIds(dataNodeId)) { assertEquals(dataNodeId, replicaId.getDataNodeId()); } } } }</code><technical_language>change this List<PartitionId></technical_language>

Target:
public void clusterMapInterface() throws JSONException { TestUtils.TestHardwareLayout testHardwareLayout = new TestUtils.TestHardwareLayout("Alpha"); TestUtils.TestPartitionLayout testPartitionLayout = new TestUtils.TestPartitionLayout(testHardwareLayout); ClusterMapManager clusterMapManager = new ClusterMapManager(testPartitionLayout.getPartitionLayout()); for (String metricName : clusterMapManager.getMetricRegistry().getNames()) { System.out.println(metricName); } List<PartitionId> partitionIds = clusterMapManager.getWritablePartitionIds(); assertEquals(partitionIds.size(), testPartitionLayout.getPartitionCount()); for (int i = 0; i < partitionIds.size(); i++) { PartitionId partitionId = partitionIds.get(i); assertEquals(partitionId.getReplicaIds().size(), testPartitionLayout.getReplicaCount()); DataInputStream partitionStream = new DataInputStream(new ByteBufferInputStream(ByteBuffer.wrap(partitionId.getBytes()))); try { PartitionId fetchedPartitionId = clusterMapManager.getPartitionIdFromStream(partitionStream); assertEquals(partitionId, fetchedPartitionId); } catch (IOException e) { assertEquals(true, false); } } for (Datacenter datacenter : testHardwareLayout.getHardwareLayout().getDatacenters()) { for (DataNode dataNode : datacenter.getDataNodes()) { DataNodeId dataNodeId = clusterMapManager.getDataNodeId(dataNode.getHostname(), dataNode.getPort()); assertEquals(dataNodeId, dataNode); for (ReplicaId replicaId : clusterMapManager.getReplicaIds(dataNodeId)) { assertEquals(dataNodeId, replicaId.getDataNodeId()); } } } }