### Question:
MaxCapacityUsageInstanceConstraint extends UsageSoftConstraint { @Override protected double getAssignmentScore(AssignableNode node, AssignableReplica replica, ClusterContext clusterContext) { float estimatedMaxUtilization = clusterContext.getEstimatedMaxUtilization(); float projectedHighestUtilization = node.getProjectedHighestUtilization(replica.getCapacity()); return computeUtilizationScore(estimatedMaxUtilization, projectedHighestUtilization); }    }### Answer:
@Test public void testGetNormalizedScore() { when(_testNode.getProjectedHighestUtilization(anyMap())).thenReturn(0.8f); when(_clusterContext.getEstimatedMaxUtilization()).thenReturn(1f); double score = _constraint.getAssignmentScore(_testNode, _testReplica, _clusterContext); Assert.assertEquals((float) score,0.8f); double normalizedScore = _constraint.getAssignmentNormalizedScore(_testNode, _testReplica, _clusterContext); Assert.assertTrue(normalizedScore > 0.99); }