### Question:
AssignableNode implements Comparable<AssignableNode> { void release(AssignableReplica replica) throws IllegalArgumentException { String resourceName = replica.getResourceName(); String partitionName = replica.getPartitionName(); if (!_currentAssignedReplicaMap.containsKey(resourceName)) { LOG.warn("Resource {} is not on node {}. Ignore the release call.", resourceName, getInstanceName()); return; } Map<String, AssignableReplica> partitionMap = _currentAssignedReplicaMap.get(resourceName); if (!partitionMap.containsKey(partitionName) || !partitionMap.get(partitionName) .equals(replica)) { LOG.warn("Replica {} is not assigned to node {}. Ignore the release call.", replica.toString(), getInstanceName()); return; } AssignableReplica removedReplica = partitionMap.remove(partitionName); removedReplica.getCapacity().entrySet().stream() .forEach(entry -> updateRemainingCapacity(entry.getKey(), -1 * entry.getValue())); } AssignableNode(ClusterConfig clusterConfig, InstanceConfig instanceConfig, String instanceName); Set<String> getAssignedPartitionsByResource(String resource); int getAssignedTopStatePartitionsCount(); int getAssignedReplicaCount(); Map<String, Integer> getRemainingCapacity(); Map<String, Integer> getMaxCapacity(); float getProjectedHighestUtilization(Map<String, Integer> newUsage); String getInstanceName(); Set<String> getInstanceTags(); String getFaultZone(); boolean hasFaultZone(); Map<String, List<String>> getDisabledPartitionsMap(); int getMaxPartition(); @Override int hashCode(); @Override int compareTo(AssignableNode o); @Override String toString();  }### Answer:
@Test public void testReleaseNoPartition() throws IOException { ResourceControllerDataProvider testCache = setupClusterDataCache(); AssignableNode assignableNode = new AssignableNode(testCache.getClusterConfig(), testCache.getInstanceConfigMap().get(_testInstanceId), _testInstanceId); AssignableReplica removingReplica = new AssignableReplica(testCache.getClusterConfig(), testCache.getResourceConfig(_resourceNames.get(1)), _partitionNames.get(2) + "non-exist", "MASTER", 1); assignableNode.release(removingReplica); }