@Test(expected = NullPointerException.class) public void recalculateMatchStrength_affMatchResult_null() { recalculator.recalculateMatchStrength(null, voter); }
public AffMatchResult recalculateMatchStrength(AffMatchResult affMatchResult, AffOrgMatchVoter voter) { Preconditions.checkNotNull(affMatchResult); Preconditions.checkNotNull(voter); float matchStrength = affMatchResult.getMatchStrength(); if (voter.voteMatch(affMatchResult.getAffiliation(), affMatchResult.getOrganization())) { matchStrength = (matchStrength + voter.getMatchStrength()) - matchStrength * voter.getMatchStrength(); } return new AffMatchResult(affMatchResult.getAffiliation(), affMatchResult.getOrganization(), matchStrength); }
AffOrgMatchStrengthRecalculator implements Serializable { public AffMatchResult recalculateMatchStrength(AffMatchResult affMatchResult, AffOrgMatchVoter voter) { Preconditions.checkNotNull(affMatchResult); Preconditions.checkNotNull(voter); float matchStrength = affMatchResult.getMatchStrength(); if (voter.voteMatch(affMatchResult.getAffiliation(), affMatchResult.getOrganization())) { matchStrength = (matchStrength + voter.getMatchStrength()) - matchStrength * voter.getMatchStrength(); } return new AffMatchResult(affMatchResult.getAffiliation(), affMatchResult.getOrganization(), matchStrength); } }
AffOrgMatchStrengthRecalculator implements Serializable { public AffMatchResult recalculateMatchStrength(AffMatchResult affMatchResult, AffOrgMatchVoter voter) { Preconditions.checkNotNull(affMatchResult); Preconditions.checkNotNull(voter); float matchStrength = affMatchResult.getMatchStrength(); if (voter.voteMatch(affMatchResult.getAffiliation(), affMatchResult.getOrganization())) { matchStrength = (matchStrength + voter.getMatchStrength()) - matchStrength * voter.getMatchStrength(); } return new AffMatchResult(affMatchResult.getAffiliation(), affMatchResult.getOrganization(), matchStrength); }  }
AffOrgMatchStrengthRecalculator implements Serializable { public AffMatchResult recalculateMatchStrength(AffMatchResult affMatchResult, AffOrgMatchVoter voter) { Preconditions.checkNotNull(affMatchResult); Preconditions.checkNotNull(voter); float matchStrength = affMatchResult.getMatchStrength(); if (voter.voteMatch(affMatchResult.getAffiliation(), affMatchResult.getOrganization())) { matchStrength = (matchStrength + voter.getMatchStrength()) - matchStrength * voter.getMatchStrength(); } return new AffMatchResult(affMatchResult.getAffiliation(), affMatchResult.getOrganization(), matchStrength); }  AffMatchResult recalculateMatchStrength(AffMatchResult affMatchResult, AffOrgMatchVoter voter); }
AffOrgMatchStrengthRecalculator implements Serializable { public AffMatchResult recalculateMatchStrength(AffMatchResult affMatchResult, AffOrgMatchVoter voter) { Preconditions.checkNotNull(affMatchResult); Preconditions.checkNotNull(voter); float matchStrength = affMatchResult.getMatchStrength(); if (voter.voteMatch(affMatchResult.getAffiliation(), affMatchResult.getOrganization())) { matchStrength = (matchStrength + voter.getMatchStrength()) - matchStrength * voter.getMatchStrength(); } return new AffMatchResult(affMatchResult.getAffiliation(), affMatchResult.getOrganization(), matchStrength); }  AffMatchResult recalculateMatchStrength(AffMatchResult affMatchResult, AffOrgMatchVoter voter);  }