### Question:
ScoreCalculatorCommon { public static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState) { double result = 0; for (Host host: clusterState.getHosts()) { if (host.missingFixedVMs(clusterState.getVms())) { result -= PENALTY_FOR_MOVING_FIXED_VMS; } } if(result < 0) { System.out.println("getClusterPenaltyScoreForFixedVms: " + result); } return result; }  static double getClusterOverCapacityScore(ClusterState clusterState); static double getClusterPenaltyScoreForFixedVms(ClusterState clusterState); final static int PENALTY_FOR_MOVING_FIXED_VMS; }### Answer:
@Test public void penaltyScoreForFixedVmsIsZeroWhenFixedVmsHaveNotBeenMoved() { assertEquals(0, ScoreCalculatorCommon.getClusterPenaltyScoreForFixedVms( getClusterWithFixedVmsNotMigrated()), DOUBLE_COMPARISON_DELTA); }
@Test public void penaltyScoreForFixedVmsIsPositiveWhenFixedVmsHaveBeenMoved() { assertEquals(-ScoreCalculatorCommon.PENALTY_FOR_MOVING_FIXED_VMS, ScoreCalculatorCommon.getClusterPenaltyScoreForFixedVms(getClusterWithFixedVmsMigrated()), DOUBLE_COMPARISON_DELTA); }
@Test public void penaltyScoreForFixedVmsIsZeroWhenThereAreNotFixedVms() { assertEquals(0, ScoreCalculatorCommon.getClusterPenaltyScoreForFixedVms( getClusterWithoutFixedVms()), DOUBLE_COMPARISON_DELTA); }